Save an image after rotation in TIFF with ASP

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

Moderators: XnTriq, xnview

abellos
Posts: 6
Joined: Fri Nov 09, 2007 6:46 pm

Save an image after rotation in TIFF with ASP

Postby abellos » Mon Sep 29, 2014 3:23 pm

Hi i use thi sub for saving image in tiff

Code: Select all

SUB rotazione(gradi)
   
   Set ctrl = server.createobject("GflAx.GflAx")
   
   f = session("PercorsoIMG")

   'response.write f
   
   'response.end
   
   With ctrl
      .enablelzw= True
      .LoadBitmap f
      .rotate gradi      
      '.SaveformatName = "tiff"   
      .SaveFormat = 5
      .BitmapType = 1 ' binary  <---- error here
      
      .SaveBitmap f
   end with
   
   set ctrl=nothing
END SUB


but the saved file is 3.70 Mb, before save was 20k. I think i must set the comression but in the help of gflax i cannot found this. In the code above the line signed give me error :

Errore di run-time di Microsoft VBScript error '800a01c2'

Numero errato di argomenti o assegnazione di proprietà non valida: 'BitmapType'

/visualizzatoreimg/db.asp, riga 26

how can set bitmaptype? I need save the file in Tiff binary mode and compression FAX G4

abellos
Posts: 6
Joined: Fri Nov 09, 2007 6:46 pm

Re: Save an image after rotation in TIFF with ASP

Postby abellos » Tue Sep 30, 2014 8:03 am

I have resolved my problem, but i had to read the source code for find the right method.
The code below

Code: Select all

Set ctrl = server.createobject("GflAx.GflAx")
   
   f = session("PercorsoIMG")

   'response.write f
   
   'response.end
   
   With ctrl
      .enablelzw= True
      .LoadBitmap f
      .rotate gradi         
      .SaveFormat = 5 'AX_TIFF
      .SaveCompression = 6 'AX_G4
      .changeColorDepth 1, 0, 1
            
      .SaveBitmap f
   end with
   
   set ctrl=nothing


there are some reference guide update to use gflax, in the zip there aren't all method and property


Return to “GFL SDK”

Who is online

Users browsing this forum: No registered users and 1 guest