Page 1 of 1

GFLAx - changing jpg resolution not working

Posted: Thu Nov 12, 2009 11:55 am
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

Re: GFLAx - changing jpg resolution not working

Posted: Thu Nov 12, 2009 6:35 pm
by xnview
could you send me the result. I can't confirm

Re: GFLAx - changing jpg resolution not working

Posted: Fri Nov 13, 2009 8:37 am
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

Re: GFLAx - changing jpg resolution not working

Posted: Thu May 22, 2014 4:13 pm
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