![]() |
|
Best way to capture screen and save to image file |
dalleg
Member #14,731
November 2012
|
Hello, I am working with Allegro 4.2 and DJGPP. This works fine but the .bmp files are way too heavy. So I tried to find out a SIMPLE way to save those screen pictures, without any loss, but with much smaller size (which means compression) First I tried the .tga file format but as I expected it does not compress. So my question is : Thanks. |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
dalleg said: I am working with Allegro 4.2 and DJGPP. Allegro 4.2 is old, even for Allegro 4. You want version 4.4.2, the latest version of allegro 4. Go back to the files page. Also DJGPP is only for DOS, so unless you know what you're doing, you should be using MinGW for Windows. Also, Allegro 4.4 comes with loadpng library installed, and it has save-ability too if I remember correctly, but with compression enabled. There's also jpgalleg if you don't mind lossy compression. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
dalleg
Member #14,731
November 2012
|
Hello Edgar, Well I work under DOS, and that's why I use DGJPP And I want to have the possibility to save the screen without any loss, so I guess jpgalleg will not help (?) |
Audric
Member #907
January 2001
|
Have you tried allegro's own save_pcx() ? The format is run-length encoded horizontally. It's recognized by popular image viewers. (edit: and especially DOS software) |
Thomas Fjellstrom
Member #476
June 2000
![]() |
dalleg said: But then I undestood that this library alone does not do any compression in the png file... I may need zlib or libpng or... PNG does compress. It actually uses zlib compression on the image data. I don't even know if there is a raw uncompressed version of png. -- |
Luiji99
Member #12,254
September 2010
|
Uncompressed data is possible, just not un-deflated. http://drj11.wordpress.com/2007/11/20/a-use-for-uncompressed-pngs/ Programming should be fun. That's why I hate Java. |
dalleg
Member #14,731
November 2012
|
Hello, I confirm that when you use save_png() function alone, without zlib, you get a .png which has exactly the same size as a .bmp. I did test it. Audric And then I suppose that if I want to use directly .png I'll have to install zlib and/or libpng... |
|