Problems with SaveBitMap

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

Moderators: helmut, XnTriq, xnview

Post Reply
Gorka
Posts: 1
Joined: Thu Apr 13, 2006 10:09 am

Problems with SaveBitMap

Post by Gorka »

Hiya all,

I am just tryin' out the asp "example4" and I keep on getting this error:

GflAx.GflAx.1 (0x80004005)
Error to create file

The line that is causing the error is: ".SaveBitmap Path & "result.jpg" "

Any ideas what can be going on? Everything else seems to work fine.

This is the code I am using:

<%
' Charge une image, modifie son orientation de 90°, l'enregistre au format JPEG
' et l'affiche dans la page.

' Use a ASP file as source of a <IMG> tag to display a picture in a HTML page

' The following contenttype are available :
' response.contenttype = "image/jpeg"
' response.contenttype = "image/gif"
' response.contenttype = "image/png"
' response.contenttype = "image/bmp"
' response.contenttype = "image/tiff"
' response.contenttype = "image/xpm"

Dim Path, File

Set ctrl = server.createobject("GflAx.GflAx")
Path = "http://pc01/StratMan/StratMan_V0/Pages/"
File = Path & "image.jpg"

const AX_JPEG = 3

With ctrl
.LoadBitmap File
.Rotate 90 'Rotation of 90°
'.SaveFormatName = "jpeg"
.SaveFormat = AX_JPEG 'Save in JPEG format
.SaveJPEGProgressive = True 'Progressive
.SaveJPEGQuality = 70 'Quality of 70%
.SaveBitmap Path & "result.jpg"

.Saveformat = AX_JPEG
response.contenttype = "image/jpeg"
response.binarywrite .SendBinary
end with

set ctrl=nothing
%>

Thanx a lot in advance !
Thanks a lot !
Gorka.
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Problems with SaveBitMap

Post by xnview »

Gorka wrote:Hiya all,

I am just tryin' out the asp "example4" and I keep on getting this error:

GflAx.GflAx.1 (0x80004005)
Error to create file

The line that is causing the error is: ".SaveBitmap Path & "result.jpg" "

Any ideas what can be going on? Everything else seems to work fine.

This is the code I am using:

Thanx a lot in advance !
You must permit writing in the folder...
Pierre.
* Gorka *

Re: Problems with SaveBitMap

Post by * Gorka * »

Hi Pierre,

Thanks for your help.

Folder permissions were already properly set. Actually, I have the OWC writting images to that folder and it works ok from that side.

I tried giving the user "All" full control over the folder, but I still get the same error.

Any other ideas?
aegirth

same problem

Post by aegirth »

I have the same problem..
All permission are right. I can upload the file, but when I try to resize it fails.
"error to create file"
Post Reply