<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:Courier New,courier,monaco,monospace,sans-serif;font-size:10pt">Possibly. Though, I'm not quite sure about it since FreeBASIC renders the loaded BMP correctly.<br><br>Here's the link to FreeBASIC's sour code for the BLOAD functionality:<br><span><a target="_blank" href="https://fbc.svn.sourceforge.net/svnroot/fbc/trunk/FreeBASIC/src/gfxlib2/libfb_gfx_bload.c">https://fbc.svn.sourceforge.net/svnroot/fbc/trunk/FreeBASIC/src/gfxlib2/libfb_gfx_bload.c</a></span><br><br>The function 'load_bmp' is on line 185. Maybe you could help find the bug, if there is.<br><br>Right now, I'm really hoping for unofficial patch:<br>* cairo_image_surface_create_from_bmp<br>* cairo_image_surface_create_from_jpg<br>* cairo_image_surface_create_from_tga<br><br> to make it easier for me and others to load images on Cairo Surface.<br><div><br></div>Regards.<br><br>Mj Mendoza
IV,<br>Developer, KonsolScript<br><a rel="nofollow" target="_blank" href="http://www.konsolscript.org">http://www.konsolscript.org</a><a rel="nofollow" target="_blank" href="http://geesas.sourceforge.net/clash"></a><div><br></div><div style="font-family: Courier New,courier,monaco,monospace,sans-serif; font-size: 10pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Jonathan Morton <jonathan.morton@movial.com><br><b><span style="font-weight: bold;">To:</span></b> Mj Mendoza IV <mjmendoza@konsolscript.org><br><b><span style="font-weight: bold;">Cc:</span></b> Cairo Graphics <cairo@cairographics.org><br><b><span style="font-weight: bold;">Sent:</span></b> Tuesday, June 1, 2010 1:29:48 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [cairo] How to load a BMP/JPG/TGA to a Surface?<br></font><br>>
FreeBASIC already have 'standalone' reusable functions that loads JPG/TGA<br>> (BMP is internally supported via BLoad). However, when I pass the loaded<br>> image to cairo, it has an offset of 8-pixels. See this image to see what I<br>> mean.<br>> <a href="http://konsolscript.org/%7Emjmendoza/freebasic/cairo/bmp-problem.png" target="_blank">http://konsolscript.org/~mjmendoza/freebasic/cairo/bmp-problem.png</a><br><br>It looks to me as though BLoad has included the BMP header in the<br>block of data it loaded. I would talk to FreeBASIC people about that.<br><br> - Jonathan Morton<br></div></div>
</div><br></body></html>