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
Save as jpeg
Moderators: XnTriq, helmut, xnview
-
- Author of XnView
- Posts: 44920
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Save as jpeg
Replace .SaveFormat by .SaveFormatName = "jpeg"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
Pierre.