Xojo Conferences
XDCMay2019MiamiUSA

Rotating Sprite Images (was Re: How can anti-aliasing be turned off?) (Real Studio games Mailinglist archive)

Back to the thread list
Previous thread: Re: realbasic-games Digest, Vol 10, Issue 23
Next thread: How can anti-aliasing be turned off?


Rotating Sprite Images (was Re: How can anti-aliasing be turned off?)   -   Heinz J.Gattringer
  Re: Rotating Sprite Images (was Re: How can anti-aliasing be turned off?)   -   Joseph J. Strout

Rotating Sprite Images (was Re: How can anti-aliasing be turned off?)
Date: 29.01.05 07:36 (Sat, 29 Jan 2005 01:36:33 -0500)
From: Heinz J.Gattringer
A brief update on my automated sprite image rotation endeavors, since
there might be something of interest for some. I upgraded my little app
to actually use a black and white mask when working on an image, as was
suggested. I even made the program draw the collection of masks on
screen, then all of the rotated images already touched up properly and,
to boot, below it all I now have a spritesurface with the appropriate
background-color displaying the images as a true sprite, in order to
allow a proper assessment of the results.

Excellent results. I managed to avoid getting whitish artifact pixels
where there shouldn't be any and tweaking the 'whiteout' threshold of
the mask allows to get very near perfect results depending on the image
colors and the general tone of the background. Funny thing I noticed:
The drawing program I use to draw up the initial upright image (It's
called Pixen and is available for free at
http://www.opensword.org/Pixen/ - or better make that donation-ware-)
works in a proprietary format called pxi. After finishing the 'artwork'
I saved the images as a pict-format. It happens that when doing the
conversion, some whitish artifacts where introduced then and there by
the drawing program (I noticed this when I was getting funny looking
masks in my REALbasic app). This was corrected by reloading the same
image as a pict-file into Pixen, removing the whitish 'halo' areas with
a simple, pure white fill and saving again with no file-format
conversion in between.

Then in my image rotation app I got the proper mask shapes and the
proper results and I was very upbeat. But surprisingly, when using the
finished files in my game project, boom, suddenly there where again
loads of whitish artifacts everywhere and my jaw dropped onto the
table. Turns out I was saving my rotated images as jpeg-files (with an
eye on keeping the files small). This conversion or reformatting was
again introducing a lot of gibberish everywhere. When saving the files
as a pict-format or even a bitmap (bmp) they show up perfectly o.k.

I'll be trying some of the other suggested tricks next.

Heinz Jose

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Rotating Sprite Images (was Re: How can anti-aliasing be turned off?)
Date: 30.01.05 00:28 (Sat, 29 Jan 2005 17:28:10 -0600)
From: Joseph J. Strout
At 1:36 AM -0500 1/29/05, Heinz J.Gattringer wrote:

>Then in my image rotation app I got the proper mask shapes and the
>proper results and I was very upbeat. But surprisingly, when using
>the finished files in my game project, boom, suddenly there where
>again loads of whitish artifacts everywhere and my jaw dropped onto
>the table. Turns out I was saving my rotated images as jpeg-files
>(with an eye on keeping the files small).

Heh, everybody makes that mistake at some point.

> This conversion or reformatting was again introducing a lot of
>gibberish everywhere. When saving the files as a pict-format or even
>a bitmap (bmp) they show up perfectly o.k.

Yep, you need a lossless format. I recommend PNG.

Best,
- Joe