|
ASP Xtreme Evolution
|
ImageThis class intends to help people use the Imager in an easy way. Imager brings some very useful image manipulations like resizing, stretching, rotating to asp. Then the result can be used directly from the memory or saved to the hard drive. You can also use it to retrieve image properties like width, height. Requirements
About
Summary
saveToFile
Saves the image to a path specified by path. Parameters
Returns
Exampledim oImage set oImage = new Image oImage.imagerUri = "http://localhost/cgi-bin/Imager.dll" oImage.image = Server.mapPath("image.png") oImage.width = 88 oImage.height = 88 oImage.compression = 88 oImage.output = ".jpg" oImage.whitespace = true oImage.bgColor = "FFFFFF" oImage.rotation = 15 call oImage.go() if(oImage.ErrorCode <> 0) then Response.write("<strong>Error:</strong> " & oImage.errorText) Response.end end if if(not oImage.saveToFile(Server.mapPath("saved/image.jpg"), true)) then Response.write(oImage.errorText) Response.end else Response.write("Saved") end if set nothing getExif
Extract EXIF(EXchangeable Image Format) data from the Xml. Returns
Exampledim oImage, Exif, sItem set oImage = new Image oImage.imagerUri = "http://localhost/cgi-bin/Imager.dll" oImage.image = Server.mapPath("image.png") call oImage.go() if(oImage.errorCode <> 0) then Response.write("<strong>Error:</strong> " & oImage.errorText) Response.end end if set Exif = oImage.getEXIF() for each sItem in Exif Response.write(sItem & " : " & Exif.item(sItem) & "<br />") next set Exif = nothing set oImage = nothing getMime
Extract MimeType from the Xml. Returns
Exampledim oImage set oImage = new Image oImage.imagerUri = "http://localhost/cgi-bin/Imager.dll" oImage.image = Server.mapPath("image.png") call oImage.go() if(oImage.errorCode <> 0) then Response.write("<strong>Error:</strong> " & oImage.errorText) Response.end end if Response.write(oImage.getMime()) set oImage = nothing getFilename
Extract filename from the imageinfo in Xml. Returns
Exampledim oImage set oImage = new Image oImage.imagerUri = "http://localhost/cgi-bin/Imager.dll" oImage.image = Server.mapPath("image.png") call oImage.go() if(oImage.errorCode <> 0) then Response.write("<strong>Error:</strong> " & oImage.errorText) Response.end end if Response.write(oImage.getFilename()) set oImage = nothing |
Executes the request to the application to retrieve the XML data.
public sub go()
Saves the image to a path specified by path.
public function saveToFile( path, overwrite )
Extract EXIF(EXchangeable Image Format) data from the Xml.
public function getExif()
Extract binary data from the Xml.
public function getBinary()
Extract MimeType from the Xml.
public function getMime()
Extract filename from the imageinfo in Xml.
public function getFilename()