[VBScript]
Set gr = Server.CreateObject("ImageGlue7.Graphic")
gr.SetFile Server.MapPath("layers.psd")
Response.Write("<b>Graphic File</b><br>")
Response.Write("Drawable = " & gr.Drawable &
"<br>")
Response.Write("Format = " & gr.Format & "<br>")
Response.Write("Number of images = " & gr.Count &
"<br>")
For Each img In gr
Response.Write("<b>Image</b><br>")
Response.Write("Rect = " & img.Rectangle &
"<br>")
Response.Write("Depth = " & img.Depth &
"<br>")
Response.Write("Resolution = " & img.Resolution
& "<br>")
Next
The code scans through each of the layers on a Photoshop
document writing out the image details to the page. The input file
and output html are shown below.
layers.psd
Graphic File
Drawable = True
Format = Planar RGB
Number of images = 4
Image
Rect = 0,0,200,200
Depth = millions
Resolution = 72
Image
Rect = 0,0,200,200
Depth = millions
Resolution = 72
Image
Rect = 38,92,184,155
Depth = millions
Resolution = 72
Image
Rect = 79,24,180,112
Depth = millions
Resolution = 72
|
|
|