Gflax - how does one read the error?

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

Moderators: XnTriq, helmut, xnview

Frontier
Posts: 6
Joined: Sun Sep 25, 2005 5:31 pm

Gflax - how does one read the error?

Post by Frontier »

Hi there :)

First of all
Thanks a ton..million...billion or more, for this great DLL. I've installed the light version some time ago (2.20), then switched to the normal vesion since selecting the right file format didn't follow the manual. Anyhow...now using the light version again, since this has apparently been fixed :)

My real question
How does one read the error message? Here's a quick example from ASP:
on error resume next
myobject.loadbitmap file_url
on error goto 0


This will make ASP resume, no matter if anyone tries to "feed" Gflax with a corrupt file of any type. Only trouble is...how does one detect if loading the file was a success or not? I can't seem to find any property in the manual holding this return value...

Sincerely,
Klaus J.


PS - a wish list :)
- Being able to use RGB values would be nice.
- anti-aliased text
- anti-aliased drawing (circles/lines/etc)
- flood fills (given X,Y,Colour values)
- Gradient fills (given X,Y,FromColour,ToColour values)
- MAYBE Gradient fills (given X,Y,FromColour,ToColour,ToAngle values)
- if one tries to use draw a circle in 8-bit mode, one gets an error.
- some day, in a far-far-away future...drop-shadows from a defined shape?
User avatar
xnview
Author of XnView
Posts: 44922
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Gflax - how does one read the error?

Post by xnview »

Frontier wrote: My real question
How does one read the error message? Here's a quick example from ASP:
on error resume next
myobject.loadbitmap file_url
on error goto 0
I don't understand, if you use "on error resume next", you continue the script after "on error goto 0". What do you want?
PS - a wish list :)
- Being able to use RGB values would be nice.
- anti-aliased text
- anti-aliased drawing (circles/lines/etc)
- flood fills (given X,Y,Colour values)
- Gradient fills (given X,Y,FromColour,ToColour values)
- MAYBE Gradient fills (given X,Y,FromColour,ToColour,ToAngle values)
- if one tries to use draw a circle in 8-bit mode, one gets an error.
- some day, in a far-far-away future...drop-shadows from a defined shape?
Ok, thanks for your suggestions.
Pierre.
Frontier
Posts: 6
Joined: Sun Sep 25, 2005 5:31 pm

Re: Gflax - how does one read the error?

Post by Frontier »

xnview wrote: I don't understand, if you use "on error resume next", you continue the script after "on error goto 0". What do you want?
I'd like to be able to know if it was able to open the file OK...

something like this
on error resume next
myobject.loadbitmap file_url
on error goto 0
if myobject.errormessage<>"" then stop-blabla end if


I'm sorry if I was confusing everyone in my last post...

Sincerely,
Klaus J.
User avatar
xnview
Author of XnView
Posts: 44922
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Gflax - how does one read the error?

Post by xnview »

Frontier wrote:
xnview wrote: I don't understand, if you use "on error resume next", you continue the script after "on error goto 0". What do you want?
I'd like to be able to know if it was able to open the file OK...

something like this
on error resume next
myobject.loadbitmap file_url
on error goto 0
if myobject.errormessage<>"" then stop-blabla end if


I'm sorry if I was confusing everyone in my last post...
.
You can do like that:

Code: Select all

With ctrl
  on error resume next 
  .LoadBitmap File

  if Err <> 0 then
    Response.Write "<br>Error."
  else
    .Saveformat = AX_JPEG
    response.contenttype = "image/jpeg"
    response.binarywrite .SendBinary
  end if
end with
Pierre.