bugs in gflsdk - gflax

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: helmut, XnTriq, xnview

Antoine
Posts: 7
Joined: Mon Mar 07, 2005 8:52 pm

bugs in gflsdk - gflax

Post by Antoine »

Hi,
I am trying to do some stuff with tiff G4 and there are several bugs that have me pulling my hair out!
1. The list of enums that appears in the list of compressions only includes run length and nothing - all the others must be got from the gflsdk.bas file.
2. You can't set the YDpi!!!!!!!!!!! argh, xdpi works but not ydpi. This is just a straight bug.
3. The number of strips is just silly. One strip should be used for tiffs unless they are absolutely huge (even then it is only a convenience). It gets rid of a lot of the interest of compression if too many strips are used - because you can't take advantage of the already used info.
I hope that these things can get sorted out and I can finally start using gflsdk properly!
Cheers
Antoine
User avatar
xnview
Author of XnView
Posts: 45867
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: bugs in gflsdk - gflax

Post by xnview »

Antoine wrote:1. The list of enums that appears in the list of compressions only includes run length and nothing - all the others must be got from the gflsdk.bas file.
Ok, i'll add it
2. You can't set the YDpi!!!!!!!!!!! argh, xdpi works but not ydpi. This is just a straight bug.
Could you post your code?
3. The number of strips is just silly. One strip should be used for tiffs unless they are absolutely huge (even then it is only a convenience). It gets rid of a lot of the interest of compression if too many strips are used - because you can't take advantage of the already used info.
TIFF specifications defines always strip, but i'll add such option to have only one strip.
Pierre.
Antoine
Posts: 7
Joined: Mon Mar 07, 2005 8:52 pm

Re: bugs in gflsdk - gflax

Post by Antoine »

Could you post your code?
PGFLAx.EnableLZW = True
PGFLAx.LoadBitmap "c:\mytif.tif"
'both Xdpi and Ydpi are 200
PGFLAx.Xdpi = 300 'works
PGFLAx.Ydpi = 300 'doesn't
PGFLAx.SaveFormat = AX_TIFF
PGFLAx.SaveCompression = 9 'GFL_CCITT_FAX4
PGFLAx.SaveBitmap "c:\mytif2.tif"

this results in having an image with 300x200 dpi
TIFF specifications defines always strip, but i'll add such option to have only one strip.
The most common compression for (CCITT G4) for tiff B&W takes a huge performance hit when you use lots of strips. Files are simply much bigger. The optimal situation would be to default to 1 strip but be able to specify... baseline tiff doesn't make any recommendation on strips (that is the only image representation possible), but then again G4 compression is not baseline...
Though this is a wild guess you will probably notice about a 30% reduction in size from heavily stripped images to a single strip. That is what I saw for the tech drawings I was manipulating.
I don't remember seeing it documented anywhere, but you also only treat the first image in a multi-image file. How do I load a multi-image file and save a multi-image file? I created the multi-page file from xnview - so I know it's possible!
Antoine