Page 1 of 1

GflAx saves GIF files with aspect ratio=0.250

Posted: Mon Sep 01, 2008 4:01 pm
by _GUI_
When I save a GIF file using GflAx from VB, I get images that have a pixel aspect ratio of 0.250 instead of being square pixels. This is no problem in Windows browsers that ignore the ratio tag, but Photoshop recognizes it and open the images stretched in the horizontal direction.

By simply changing the pixel aspect ratio to square they display fine but it's annoying.

This is the code I am using:

Code: Select all

Set MyObjMap = New GflAx.GflAx
MyObjMap.NewBitmap Width, Height

    ... graphical commands ...

MyObjMap.SaveFormat = AX_GIF
MyObjMap.SaveBitmap ("c:\image.gif")
Is there some paremeter to control the aspect ratio? I didn't find anything in the help file.

Best regards.

Re: GflAx saves GIF files with aspect ratio=0.250

Posted: Mon Sep 08, 2008 1:12 pm
by xnview
_GUI_ wrote: Is there some paremeter to control the aspect ratio? I didn't find anything in the help file.
No, but i don't save it

Posted: Wed Jan 14, 2009 7:29 pm
by _GUI_
So what could be the solution? this is how GIF files look when opened in Photoshop (up straight from GflSDK, bottom after correcting aspect ratio to sqare):

Image

The original GIF can be found here: http://www.guillermoluijk.com/article/s ... perccd.gif


Thank you and Happy New Year!

Posted: Thu Jan 15, 2009 8:31 am
by dominique
In photoshop, you have an option : Image > Pixel Aspect Ratio > Square
And your image will be well displayed.
A link with little bit more information :
http://www.tek-tips.com/viewthread.cfm? ... 004&page=1

Posted: Sun Jan 18, 2009 1:31 am
by _GUI_
dominique wrote:In photoshop, you have an option : Image > Pixel Aspect Ratio > Square
Dominique, that is exactly what I did to obtain the former image correctly displayed.
My qestion is: is there anything that can be done in the Gfl SDK to obtain .GIF files straight in a correct 1:1 aspect ratio?

BR

Posted: Sun Jan 18, 2009 5:39 pm
by dominique
As there is nothing in GFLSDK you can modify your file after the save operation and change the corresponding value in the file's header :
http://www.u229.no/stuff/GIFFormat/
I try to change this value in your file then the file is directly well displayed in photoshop.

Posted: Mon Jan 19, 2009 12:33 am
by _GUI_
dominique wrote:As there is nothing in GFLSDK you can modify your file after the save operation and change the corresponding value in the file's header :
http://www.u229.no/stuff/GIFFormat/
I try to change this value in your file then the file is directly well displayed in photoshop.
Cool, right what I needed. Thank you very much Dominique.

Anyway I would like to report this minor BUG to the author of GflSDK, just a 1:1 aspect ratio by default on GIFs would be appreciated.

Guillermo

Posted: Mon Jan 19, 2009 7:56 am
by xnview
_GUI_ wrote: Anyway I would like to report this minor BUG to the author of GflSDK, just a 1:1 aspect ratio by default on GIFs would be appreciated.
Strange, i use 1:1 ratio, could you send me a gif sample?

Posted: Mon Jan 19, 2009 5:21 pm
by _GUI_
xnview wrote:
_GUI_ wrote: Anyway I would like to report this minor BUG to the author of GflSDK, just a 1:1 aspect ratio by default on GIFs would be appreciated.
Strange, i use 1:1 ratio, could you send me a gif sample?
Sure, here you are: http://www.guillermoluijk.com/article/s ... perccd.gif

It displays OK on any web browser, but when opening into PS (CS2) it is stretched for being aspect ratio 0.25

BR