GflAx saves GIF files with aspect ratio=0.250

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

Moderators: XnTriq, helmut, xnview

_GUI_
Posts: 22
Joined: Fri Sep 08, 2006 12:22 am

GflAx saves GIF files with aspect ratio=0.250

Post 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.
User avatar
xnview
Author of XnView
Posts: 44339
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: GflAx saves GIF files with aspect ratio=0.250

Post 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
Pierre.
_GUI_
Posts: 22
Joined: Fri Sep 08, 2006 12:22 am

Post 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!
User avatar
dominique
Posts: 72
Joined: Thu Nov 08, 2007 9:22 am

Post 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
Dom
_GUI_
Posts: 22
Joined: Fri Sep 08, 2006 12:22 am

Post 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
User avatar
dominique
Posts: 72
Joined: Thu Nov 08, 2007 9:22 am

Post 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.
Dom
_GUI_
Posts: 22
Joined: Fri Sep 08, 2006 12:22 am

Post 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
User avatar
xnview
Author of XnView
Posts: 44339
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Post 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?
Pierre.
_GUI_
Posts: 22
Joined: Fri Sep 08, 2006 12:22 am

Post 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