GFLAx - changing jpg resolution not working

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

Moderators: XnTriq, helmut, xnview

SMothes
Posts: 2
Joined: Tue Oct 27, 2009 10:43 am

GFLAx - changing jpg resolution not working

Postby SMothes » Thu Nov 12, 2009 11:55 am

Hi,

we are using GFLAx to change image formats and resolution. Conversion from EPS to any other format works as expected.

However, if we want to change the resolution of the attached jpeg from 300 to 100 DPI with following code:

Code: Select all

   
    Dim x As GflAx.GflAx
    x = New GflAx.GflAx

    Dim sFilenameInput As String = "someFile"
    x.LoadBitmap(sFilenameInput)
    x.Xdpi = 100
    x.Ydpi = 100
    Dim sFilenameOutput As String = "someOutputFile"
    x.SaveBitmap(sFilenameOutput)
    x.FreeBitmap()



the resolution of the jpeg does not change and stays always at 300 DPI.
What are we doing wrong?


Thanks in advance

Regards

S.M.

Edit: I forgot to mention that we are using the latest GFLAx library
Attachments
300 DPI.jpg
300 DPI.jpg (24.7 KiB) Viewed 3153 times

User avatar
xnview
Author of XnView
Posts: 27030
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: GFLAx - changing jpg resolution not working

Postby xnview » Thu Nov 12, 2009 6:35 pm

could you send me the result. I can't confirm
Pierre.

SMothes
Posts: 2
Joined: Tue Oct 27, 2009 10:43 am

Re: GFLAx - changing jpg resolution not working

Postby SMothes » Fri Nov 13, 2009 8:37 am

thank you for your response.

I'll send you the result and the small sample VB.net application via e-mail.

Thanks in advance

YannLR
Posts: 2
Joined: Fri Sep 21, 2012 5:49 am

Re: GFLAx - changing jpg resolution not working

Postby YannLR » Thu May 22, 2014 4:13 pm

Dear Pierre
i've the same problem but in classic asp script.

Code: Select all

.LoadBitmap PathImage
   .Xdpi = 72
   .Ydpi = 72

   if .width<> .height then 'l'image n'est pas carrée
      if .width> .height then
      NewCanvas   =   .width
      newWidth = TailleFichier 'Get the height according to the width (keep the ratio)
      newHeight = (newWidth * NewCanvas) / NewCanvas
      else
      NewCanvas   =   .height
      newHeight    = TailleFichier
      newWidth    = (newHeight * NewCanvas) / NewCanvas
      end if
   
   '.ChangeColorDepth AX_To16Colors
    .ResizeCanvas NewCanvas, NewCanvas, 100 ,RGB(255,255,255)

   end if
   '.Resize newWidth, newHeight 'Resize the pciture
   
   ' .SaveJPEGProgressive=True
   
   .SaveJPEGQuality=100
   
    .Saveformat = 1
   .SaveBitmap FolderImage&Dossier&"\w-"&Upload.UploadedFiles(fileKey).FileName


My image stay in original resolution.
i've the lastest Gflax sdk
have a nice day
Yann


Return to “GFL SDK”

Who is online

Users browsing this forum: No registered users and 1 guest