GFLAx - changing jpg resolution not working

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

Moderators: XnTriq, helmut, xnview

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

GFLAx - changing jpg resolution not working

Post by SMothes »

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

Re: GFLAx - changing jpg resolution not working

Post by xnview »

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

Post by SMothes »

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

Post by YannLR »

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
Post Reply