![]() |
.gif and .jpeg support - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49) +---- Thread: .gif and .jpeg support (/showthread.php?tid=832) |
.gif and .jpeg support - Robin - 15-03-2007 Might support png as well, haven't tested. I followed JimCamels tutorial and thought it long winded and pointless. I looked around and found out how to load something as an image without using a picture box. It's mostly just common sense, but I found code all over for it. Code: Function CreateSurfaceFromFile(DirectDraw As DirectDraw7, ByVal _ Code: Public Declare Function CreateCompatibleDC Lib "gdi32" ( _ - Ramsey - 15-03-2007 awesome, goin to test it later... - Xlithan - 16-03-2007 JimCamel, now there's a name that goes a long way back. - Sephiroth187 - 16-03-2007 could always have Code: Dim pic as StdPicture simplistic method. Might not be as good but....sure helps with minimal amount of lines Make sure you grab the width/height etc ![]() - Coke - 16-03-2007 Verrigan Wrote:Just wanted to point out that the pictures are converted to bitmaps when the surface is created... No matter what format they are in. If we are using .png files will it actually slow the client down at any point at all when it has to convert? - Sephiroth187 - 16-03-2007 in order to load/convert PNG files you must use external DLL calling. VB does not support the PNG format. Look about on the net... I dont really like the png format idea. Just use ZLib with bmp for the win. - Robin - 16-03-2007 I gave up trying to find a method for .png. gif is smaller anyway. faffing around with extrernal .dll files is pointless when there is a more optimised image file format. - Coke - 16-03-2007 You guys that are going on about not being able to find .png format.. ^_^ its in the konfuze milestone source if you want it =P - Sephiroth187 - 17-03-2007 IMO png isnt worth it, bitmap format using zlib compression is way smaller than png. Although I like the idea of transparency capability, but again bitmap supports that to. Of course, it could provide to be easier ![]() But you could argue the process of changing PNG to BMP could be slower than just compress/uncompress. Especially on the scale size of the typical MS tileset. Such a pity, should break it up into smaller parts. IMO 128 x 128 - Robin - 17-03-2007 Well, I use .gif files because all my maps are pre-made. I have the entire map blted, then the tops of houses etc. blted above everything else (aka. fringe). Means I'm not copying 900 different 32x32 blocks each loop. I then save the attributes to a 'map' file. Runs very nice. - Boo - 23-03-2007 you should make an PNG support since its more compressed. JPG gets blurry and GIF tends to loose color :\ ----------- EDIT: They HAD an PNG support tutorial on Elysium somewhere but I think its gone, but just FYI, the dll needed for PNG is 'PaintX.dll' |