libpgf-user Mailing List for libPGF
libPGF is an implementation of the Progressive Graphics File (PGF)
Brought to you by:
c_stamm
You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(5) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2011 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
From: Leith B. <le...@le...> - 2011-12-08 23:05:08
|
Hi, I have been looking at the internals of libpgf and I now realise that libpgf is not suitable for compressing large images because all the data is read into memory before compressing and I would need a machine with 10GB of RAM to compress my image. I was hoping to use libpgf as a free alternative to ECW and JPEG2000 for compressing large datasets. Both ECW and JPEG2000 are able to compress very large images with only a small amount of RAM needed. I believe they work on a scanline by scanline basis. Does the libpgf encoding internals use the whole image at once or could it be modified to use scanline by scanline? Does the ROI mode require only the current 'tile' to be in RAM? This would save a lot of RAM. I am very disappointed that wavelet compression of big datasets is still not possible with free tools... ECW is a commercial proprietary file format and ERDAS only provide the decompressor for free (they used to provide a free compressor but they made it expensive to make more $$$). JPEG2000 is an open format but all the open source compressors are either buggy and break/crash with large images or are horibbly slow or use too much RAM. So far the only decent JPEG2000 tools I have found are commercial. Kakadu is an excellent library and is very fast, ERDAS also make a decent compressor but is expensive like there ECW tools. I was hopeful when I recently discovered libPGF but now I realise it is useless just like all the other opensource stuff :-( Seems the only open source way to compress large data is with GZIPed TIFF files... Thanks, Leith Bade le...@le... On 9 December 2011 10:27, Leith Bade <le...@le...> wrote: > Hi, > > I tracked down the problem. Ubuntu 10.10 has a newer version of > FreeImage than the one included with pgf. As such the FreeImage > headers in the pgf include directory conflicted with the installed > FreeImage binary. > > It is a *really* bad idea to include library header files in Linux > source distributions. > > I fixed this by removing the include folder from makefile.am. Also now > that FreeImage supports unsigned width and height I modified the > CImage::Create function to use unsigned int instead of int, and > removed the (WORD) casts. > > I also modified the second Create function to use unsigned int for bpp > as it is a bad idea to mix unsigned/signed stuff. > > The PNMPlugin.ccpp also likely needs an update to use unsigned ints > with the updated FreeImage functions. There are some more > signed/unsigned conversions in here too. > > I now have the program compiled. > > Unfortunately it appears the program won't open my 9.9GB TIFF data > that I want to compress: > Error: Could not load source file. > > Does the FreeImage library handle BigTIFF files? ie files > 4GB. > > If it doesn't I am going to have to write some sort of plugin for GDAL > to convert my files. > > Does PGF define a format for storing geospatial information, or will I > have to define my own? (Possibly create a new standard for it) > > Thanks, > Leith Bade > le...@le... > > > > On 9 December 2011 09:02, Leith Bade <le...@le...> wrote: >> Hi, >> >> I am trying to install the pgf tools on Ubntu 10.10 but I get some >> really strange linker errors about FreeImagePlus: >> libtool: link: g++ -g -O2 -o pgf PNMPlugin.o CImage.o PGF.o >> -lfreeimageplus /usr/lib/libpgf.so >> CImage.o: In function `CImage::Create(int, int, unsigned char)': >> /home/leith/projects/pgf-6.11.42/src/CImage.cpp:93: undefined >> reference to `fipImage::setSize(FREE_IMAGE_TYPE, unsigned short, >> unsigned short, unsigned short, unsigned int, unsigned int, unsigned >> int)' >> /home/leith/projects/pgf-6.11.42/src/CImage.cpp:73: undefined >> reference to `fipImage::setSize(FREE_IMAGE_TYPE, unsigned short, >> unsigned short, unsigned short, unsigned int, unsigned int, unsigned >> int)' >> CImage.o: In function `CImage::Create(int, int, int)': >> /home/leith/projects/pgf-6.11.42/src/CImage.cpp:44: undefined >> reference to `fipImage::setSize(FREE_IMAGE_TYPE, unsigned short, >> unsigned short, unsigned short, unsigned int, unsigned int, unsigned >> int)' >> CImage.o: In function `CImage': >> /home/leith/projects/pgf-6.11.42/src/CImage.cpp:29: undefined >> reference to `fipImage::fipImage(FREE_IMAGE_TYPE, unsigned short, >> unsigned short, unsigned short)' >> /home/leith/projects/pgf-6.11.42/src/CImage.cpp:29: undefined >> reference to `fipImage::fipImage(FREE_IMAGE_TYPE, unsigned short, >> unsigned short, unsigned short)' >> >> I have installed the Ubuntu libfreeimage-dev package, and it seems to >> be finding the .so as before I installed libfreeimage ld complained >> that it could not find it. >> >> The strange thing is that the errors reference parameter typed of >> "unsigned short", but the header FreeImagePlus.h defines the >> parameters as just "unsigned". Where is ld getting the idea that they >> should be "unsigned plus"? >> >> Removing the "(WORD)" casts from CImage.cpp did not seem to change anything. >> >> Thanks, >> Leith Bade >> le...@le... |
From: Leith B. <le...@le...> - 2011-12-08 21:27:50
|
Hi, I tracked down the problem. Ubuntu 10.10 has a newer version of FreeImage than the one included with pgf. As such the FreeImage headers in the pgf include directory conflicted with the installed FreeImage binary. It is a *really* bad idea to include library header files in Linux source distributions. I fixed this by removing the include folder from makefile.am. Also now that FreeImage supports unsigned width and height I modified the CImage::Create function to use unsigned int instead of int, and removed the (WORD) casts. I also modified the second Create function to use unsigned int for bpp as it is a bad idea to mix unsigned/signed stuff. The PNMPlugin.ccpp also likely needs an update to use unsigned ints with the updated FreeImage functions. There are some more signed/unsigned conversions in here too. I now have the program compiled. Unfortunately it appears the program won't open my 9.9GB TIFF data that I want to compress: Error: Could not load source file. Does the FreeImage library handle BigTIFF files? ie files > 4GB. If it doesn't I am going to have to write some sort of plugin for GDAL to convert my files. Does PGF define a format for storing geospatial information, or will I have to define my own? (Possibly create a new standard for it) Thanks, Leith Bade le...@le... On 9 December 2011 09:02, Leith Bade <le...@le...> wrote: > Hi, > > I am trying to install the pgf tools on Ubntu 10.10 but I get some > really strange linker errors about FreeImagePlus: > libtool: link: g++ -g -O2 -o pgf PNMPlugin.o CImage.o PGF.o > -lfreeimageplus /usr/lib/libpgf.so > CImage.o: In function `CImage::Create(int, int, unsigned char)': > /home/leith/projects/pgf-6.11.42/src/CImage.cpp:93: undefined > reference to `fipImage::setSize(FREE_IMAGE_TYPE, unsigned short, > unsigned short, unsigned short, unsigned int, unsigned int, unsigned > int)' > /home/leith/projects/pgf-6.11.42/src/CImage.cpp:73: undefined > reference to `fipImage::setSize(FREE_IMAGE_TYPE, unsigned short, > unsigned short, unsigned short, unsigned int, unsigned int, unsigned > int)' > CImage.o: In function `CImage::Create(int, int, int)': > /home/leith/projects/pgf-6.11.42/src/CImage.cpp:44: undefined > reference to `fipImage::setSize(FREE_IMAGE_TYPE, unsigned short, > unsigned short, unsigned short, unsigned int, unsigned int, unsigned > int)' > CImage.o: In function `CImage': > /home/leith/projects/pgf-6.11.42/src/CImage.cpp:29: undefined > reference to `fipImage::fipImage(FREE_IMAGE_TYPE, unsigned short, > unsigned short, unsigned short)' > /home/leith/projects/pgf-6.11.42/src/CImage.cpp:29: undefined > reference to `fipImage::fipImage(FREE_IMAGE_TYPE, unsigned short, > unsigned short, unsigned short)' > > I have installed the Ubuntu libfreeimage-dev package, and it seems to > be finding the .so as before I installed libfreeimage ld complained > that it could not find it. > > The strange thing is that the errors reference parameter typed of > "unsigned short", but the header FreeImagePlus.h defines the > parameters as just "unsigned". Where is ld getting the idea that they > should be "unsigned plus"? > > Removing the "(WORD)" casts from CImage.cpp did not seem to change anything. > > Thanks, > Leith Bade > le...@le... |
From: Leith B. <le...@le...> - 2011-12-08 20:32:10
|
Hi, I am trying to install the pgf tools on Ubntu 10.10 but I get some really strange linker errors about FreeImagePlus: libtool: link: g++ -g -O2 -o pgf PNMPlugin.o CImage.o PGF.o -lfreeimageplus /usr/lib/libpgf.so CImage.o: In function `CImage::Create(int, int, unsigned char)': /home/leith/projects/pgf-6.11.42/src/CImage.cpp:93: undefined reference to `fipImage::setSize(FREE_IMAGE_TYPE, unsigned short, unsigned short, unsigned short, unsigned int, unsigned int, unsigned int)' /home/leith/projects/pgf-6.11.42/src/CImage.cpp:73: undefined reference to `fipImage::setSize(FREE_IMAGE_TYPE, unsigned short, unsigned short, unsigned short, unsigned int, unsigned int, unsigned int)' CImage.o: In function `CImage::Create(int, int, int)': /home/leith/projects/pgf-6.11.42/src/CImage.cpp:44: undefined reference to `fipImage::setSize(FREE_IMAGE_TYPE, unsigned short, unsigned short, unsigned short, unsigned int, unsigned int, unsigned int)' CImage.o: In function `CImage': /home/leith/projects/pgf-6.11.42/src/CImage.cpp:29: undefined reference to `fipImage::fipImage(FREE_IMAGE_TYPE, unsigned short, unsigned short, unsigned short)' /home/leith/projects/pgf-6.11.42/src/CImage.cpp:29: undefined reference to `fipImage::fipImage(FREE_IMAGE_TYPE, unsigned short, unsigned short, unsigned short)' I have installed the Ubuntu libfreeimage-dev package, and it seems to be finding the .so as before I installed libfreeimage ld complained that it could not find it. The strange thing is that the errors reference parameter typed of "unsigned short", but the header FreeImagePlus.h defines the parameters as just "unsigned". Where is ld getting the idea that they should be "unsigned plus"? Removing the "(WORD)" casts from CImage.cpp did not seem to change anything. Thanks, Leith Bade le...@le... |
From: Phil H. <ph...@ow...> - 2011-03-07 15:56:33
|
Hi Raphael, Thanks for explaining this, and for the sample images. I got the 768-byte colour table size from the exiv2 0.21 source code since I didn't have any indexed colour samples to test, but it seems as if it might be exiv2 with the problem here. - Phil On 7-Mar-11, at 9:30 AM, Schweizer Raphael wrote: > Hi Phil > > Glad to hear about the upcomming support of PGF in ExifTool. > > "There is a question of version number if we go to software other > than digikam. Currently digikam writes a version of 0x36 and it > seems that this version may use a 768-byte indexed color table, > which is different from the 1024-byte table mentioned in the PGF > specification (which is for version 6, but it is unclear to me if > version 6 is hexadecimal 0x06, or ASCII "6" in the header as > written by digikam.)" > > The current file format is 6, 0x36 as written by digiKam through > libPGF originates from a 'version mask' (from PGFtypes.h): > > // version flags > #define Version2 2 // data structure PGFHeader of major > version 2 > #ifdef __PGF32SUPPORT__ > #define PGF32 4 // 32 bit values are used -> allows at > maximum 31 bits > #else > #define PGF32 0 // 16 bit values are used -> allows at > maximum 15 bits > #endif > #define PGFROI 8 // supports Regions Of Interest > #define Version5 16 // new coding scheme since major version 5 > #define Version6 32 // new HeaderSize: 32 bits instead of 16 > bits > // version numbers > #define PGFVersion (Version2 | Version5 | Version6 | PGF32) // > current standard version > > The size of the (optional, only used for indexed images) color > table is always 1024 bytes. If we write otherwise, please leave a > message so we can correct that. A current no-user-data PGF file > will start with "50 47 46 36" followed by "10 00 00 00" (16 decimal > = 0x10 bytes) for non-indexed respectively "10 04 00 00" (1040 = 16 > + 1024 decimal = 0x410 bytes) for indexed images. > > I attached some sample files containing no user data. Feel free to > ask any follow up questions. > > - Raphael > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > <Bitmap1.PGF><Indexed8.PGF><RGB12.PGF><RGB32.PGF><Gray8.PGF> |
From: Elle S. <l.e...@gm...> - 2011-01-26 22:37:43
|
Hi pgf people, I sent a pgf file to Phil Harvey (ExifTool) and he generously and immediately set about adding support for pgf to ExifTool. Alas, my ability to provide sample files is limited to what digiKam can do. Can you all please send a sample pgf file or two to Phil Harvey, per his following request? I have no way to generate the kind of samples that he needs, and after thinking about it, the best place to get good pgf samples seemed to be from you all. Quoting Phil's request: "The indexed-color PGF images are a slightly different format, so I will need a sample of one of these too if possible. The samples you have sent so far are all RGB color." and " On 26-Jan-11, at 10:03 AM, Elle Stone wrote: would you mind if I give your email address to another person more involved with pgf and ask him to send you an indexed rgb? (Phil's reply follows:) Go right ahead. There is a question of version number if we go to software other than digikam. Currently digikam writes a version of 0x36 and it seems that this version may use a 768-byte indexed color table, which is different from the 1024-byte table mentioned in the current PGF specification (which is for version 6, but it is unclear to me if version 6 is hexadecimal 0x06, or ASCII "6" in the header as written by digikam)." Thanks in advance to pgf developers and thank you Phil for adding support to ExifTool. Elle Stone |
From: Mateusz L. <ma...@lo...> - 2010-10-22 15:59:42
|
On 22/10/10 16:48, Mateusz Loskot wrote: > Folks, > > Does anyone know if there .deb packages of libpgf? > Or, any is there any initiative for that? I haven't found anything in Debian/Ubuntu archives, thus I submitted needs-packaging request: https://bugs.launchpad.net/ubuntu/+bug/665179 Best regards, -- Mateusz Loskot, http://mateusz.loskot.net Charter Member of OSGeo, http://osgeo.org Member of ACCU, http://accu.org |
From: Mateusz L. <ma...@lo...> - 2010-10-22 15:46:58
|
Folks, Does anyone know if there .deb packages of libpgf? Or, any is there any initiative for that? Best regards, -- Mateusz Loskot, http://mateusz.loskot.net Charter Member of OSGeo, http://osgeo.org Member of ACCU, http://accu.org |
From: Raphael S. <rsc...@sc...> - 2010-05-26 15:28:01
|
The short answer: no The not so short answer: Currently, there is no way to set an arbitrary bitrate, i.e. the final file size. In theory it should be sufficient to somehow estimate a quality level and truncate the file at the end of a pyramid level. This would allow for maximum quality encoding with a limited file size. The estimation problem is equivalent, i.e. if we knew a way to predict the file size for a particular image and q level, we might as well use this to calculate the q level required for a given bitrate and vice versa. We do have this on our long term feature request list, however. Raphael > -----Original Message----- > From: bucketbot [mailto:bucketbot@...] > Sent: Freitag, 21. Mai 2010 10:46 > To: Raphael Schweizer > Subject: Re: [Libpgf-user] Missing header? > > > Thanks for the information, Raphael. I'll see what I can do with it. One last > question: is there any way to apply quantisation in a way that will let me > determine an approximate file-size, rather than simple integer-based > quantisation? Or is there a fast way (a shortcut) to estimate the final size for > a particular Q level? |
From: Raphael S. <rsc...@sc...> - 2010-05-19 15:56:10
|
libPGF can be used with the following formats: - YUV, packed, no subsampling (x:x:x) (i.e. YUY2, YV12 are not supported) - the following image color modes compatible with Adobe Photoshop bitmaps: IndexedColor, GrayScale, RGBColor, CMYKColor, HSLColor, HSBColor, LabColor, RGB12, RGBA, Gray16, RGB16, RGB48, Lab48, CMYK64, Gray31 Other images must be converted first. Raphael > -----Original Message----- > From: bucketbot [mailto:buc...@ya...] > Sent: Montag, 17. Mai 2010 00:25 > To: lib...@li... > Subject: Re: [Libpgf-user] Missing header? > [...] > > Is it possible to do conversions with internal PGF functions? I'll want to be > able to convert YCC<->RGB. Also, can I compress YCC images (for example, > 'YUY2' 4:2:2 or 'YV12' 4:2:0 data)? > > Thanks again! > [...] |
From: bucketbot <buc...@ya...> - 2010-05-16 22:25:13
|
Hi, Thanks! I didn't realise the headers weren't included - silly mistake. Once I downloaded the codec source, everything was fine. I put the codec into a VFW (AVI) wrapper. It seems to be working pretty well! Is it possible to do conversions with internal PGF functions? I'll want to be able to convert YCC<->RGB. Also, can I compress YCC images (for example, 'YUY2' 4:2:2 or 'YV12' 4:2:0 data)? Thanks again! --- On Fri, 5/14/10, Raphael Schweizer <rsc...@sc...> wrote: > From: Raphael Schweizer <rsc...@sc...> > Subject: Re: [Libpgf-user] Missing header? > To: lib...@li... > Date: Friday, May 14, 2010, 1:22 AM > The PGFconsole depends on libPGF, > i.e. the files in libpgf-*-src.zip > > Using MS Visual Studio the folder structure after > extraction should look > like: > > +---libpgf > │ +---doc > │ +---include > │ +---src > L---pgf > +---dll > +---doc > +---include > +---lib > +---src > > 1.) Compile libpgf -> PGFCodec.lib (Release, > Win32 configuration) or > PGFCodecd.lib (Debug) in libpgf\lib\Win32 > 2.) Compile pgf (the pgfconsole) using the header in > libpgf\include and the > generated lib > > Raphael > > > -----Original Message----- > > From: bucketbot [mailto:buc...@ya...] > > Sent: Freitag, 14. Mai 2010 07:50 > > To: lib...@li... > > Subject: [Libpgf-user] Missing header? > > > > > > I'm trying to compile the PGF-codec demonstration but > it uses a header > file > > "PGFimage.h" that was not included in the archive? > It's referenced in > > PGF.cpp. > > > > Ideas? Did I miss something? > > > > Thanks! > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Libpgf-user mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libpgf-user > |
From: Raphael S. <rsc...@sc...> - 2010-05-14 08:41:23
|
The PGFconsole depends on libPGF, i.e. the files in libpgf-*-src.zip Using MS Visual Studio the folder structure after extraction should look like: +---libpgf │ +---doc │ +---include │ +---src L---pgf +---dll +---doc +---include +---lib +---src 1.) Compile libpgf -> PGFCodec.lib (Release, Win32 configuration) or PGFCodecd.lib (Debug) in libpgf\lib\Win32 2.) Compile pgf (the pgfconsole) using the header in libpgf\include and the generated lib Raphael > -----Original Message----- > From: bucketbot [mailto:buc...@ya...] > Sent: Freitag, 14. Mai 2010 07:50 > To: lib...@li... > Subject: [Libpgf-user] Missing header? > > > I'm trying to compile the PGF-codec demonstration but it uses a header file > "PGFimage.h" that was not included in the archive? It's referenced in > PGF.cpp. > > Ideas? Did I miss something? > > Thanks! |
From: bucketbot <buc...@ya...> - 2010-05-14 05:50:34
|
I'm trying to compile the PGF-codec demonstration but it uses a header file "PGFimage.h" that was not included in the archive? It's referenced in PGF.cpp. Ideas? Did I miss something? Thanks! |
From: Raphael S. <rsc...@sc...> - 2009-10-29 13:21:54
|
Dear PGF users a new release (6.09.44) of the codec and the accompanying console application is now available on sourceforge. CHANGES: ======== Codec - fixed decoder crash on bigendian systems Console - channel swap for bigendian - updated to FreeImage 3.13.0 - removed unused header installs Win/VS - fixed VS project settings Please report any issues you encounter. Regards, Raphael |