Writing a .jpg image
Blitz3D Forums/Blitz3D Beginners Area/Writing a .jpg image
| ||
Is it possible to write a .jpg image in blitz? I know with saveimage you can save in .bmp but not .jpg, so how would I go about doing this? |
| ||
SaveImage image,"image.jpg" That should do the trick. |
| ||
That'll save a BMP file with a JPG extension, won't it? |
| ||
It wouldn't compress it, no. But it would create a jpeg image. I'm not sure if there is any sure-fire way to create a true jpeg image. |
| ||
It wouldn't compress it, no. But it would create a jpeg image. I don't have Blitz3D installed any more so I can't prove it, but I'm quite sure you're wrong. The file will still be saved with a BMP header. |
| ||
Yes, I think Gfk is right, it is a .bmp file with a .jpg extension. But maybe you could use FreeImage to save jpg ? |
| ||
SaveImage saves to BMP only. |
| ||
:/ Right, there is also a command called FreeImage .. which makes my remark quite ambigious.. Actually I ment this: http://freeimage.sourceforge.net/ |
| ||
If you doSaveImage image,"image.bmp" and then do SaveImage image,"image.jpg" and open both files in notepad, you'll get the same exact text. (BMP encoded) |
| ||
use FreeImage library to save JPG/png/whatever.. http://freeimage.sourceforge.net |
| ||
And the DECLS are in the code archives... |