Save as jpeg

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

Moderators: XnTriq, helmut, xnview

lindstromcx
Posts: 1
Joined: Mon Jan 16, 2006 7:36 pm

Save as jpeg

Post by lindstromcx »

Hi

I am using this code, but i want the picture to be saved in JPEG, where do i change this code?
The pictures are now saved in *.png


const AX_JPEG = 3
const AX_To16Colors = 16

With ctrl
.LoadBitmap File
.ChangeColorDepth AX_To256Colors

newWidth = 110 'Get the height according to the width (keep the ratio)
newHeight = (newWidth * .Height) / .Width

.Resize newWidth, newHeight 'Resize the pciture

.SaveFormat = AX_JPEG 'Save in JPEG format
.SaveJPEGProgressive = True 'Progressive
.SaveJPEGQuality = 100 'Quality of 100%
.SaveBitmap Server.MapPath("/bilder/"&strLopnr&"/small/xx.jpg")

.Saveformat = AX_JPEG

'response.contenttype = "image/jpeg"
'response.binarywrite .SendBinary
end with
User avatar
xnview
Author of XnView
Posts: 44920
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Save as jpeg

Post by xnview »

lindstromcx wrote:Hi

I am using this code, but i want the picture to be saved in JPEG, where do i change this code?
The pictures are now saved in *.png


const AX_JPEG = 3
const AX_To16Colors = 16

With ctrl
.LoadBitmap File
.ChangeColorDepth AX_To256Colors

newWidth = 110 'Get the height according to the width (keep the ratio)
newHeight = (newWidth * .Height) / .Width

.Resize newWidth, newHeight 'Resize the pciture

.SaveFormat = AX_JPEG 'Save in JPEG format
.SaveJPEGProgressive = True 'Progressive
.SaveJPEGQuality = 100 'Quality of 100%
.SaveBitmap Server.MapPath("/bilder/"&strLopnr&"/small/xx.jpg")

.Saveformat = AX_JPEG

'response.contenttype = "image/jpeg"
'response.binarywrite .SendBinary
end with
Replace .SaveFormat by .SaveFormatName = "jpeg"
Pierre.