On 4-May-07, at 5:52 PM, Carlos M wrote: > On May 04, 2007 3:41 PM Joe Strout wrote: >> Images in the project get converted to BMPs for Windows, which are a >> very poorly compressed format. >> >> I'm having a similar problem with a game I'm working on (*), where >> we're keeping all the images in BMP format to be sure they will work >> cross-platform. The resulting package is obnoxiously large already, >> and will get much larger before the game is done. But now I'm >> wondering if I've forgotten an important release note... does RB now >> support PNG images on Windows without QuickTime? What about Linux? > > I don't know the exact answer to that (I suppose Windows XP and > higher versions > supports them), but have you considered using the "PNG Utilities > Plugin"? > <http://developer.chaoticbox.com/realbasic.php? > tab=plugins#pngutilities> > > I just did the following experience using the "PNG Utilities > Plugin" and it > works fine: > 1. Get a string from a PNG file using: > Dim p As Picture > Dim pString As String > p = PNGu.OpenAsPictureWithMask( GetFolderItem("radio.png") ) > pString = PNGu.GetData(p) > // You could this in just one line to get the data string > 2. Save pString into a text file (e.g. radio.txt) > 3. Add the radio.txt to the project > 4. Create a picture from the text file using: > // In my test I used the canvas backdrop > Canvas1.Backdrop = PNGu.GetPictureWithMask(radio) > > You'll have to transform all your PNG files into text files and > then add them to > the project.
Or, just change the file extension from .png to .txt (or some other extension RB won't recognize as an image, like .dat). On Mac OS you *might* also have to change the file type as well - there are many free utilities that can manage that however. I'd recommend this over loading & re-saving with PNGu because PNGu only saves full colour images which may be larger than the original PNG file, especially if it was processed with a utility like optipng or pngcrush. I should also note that PNGu adds 50-350 KB to the final build size (depending on the target) so it may not make sense to use it just for one or two small images. Frank. <http://developer.chaoticbox.com/> <http://macgameblog.com/> _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
