Home     Products      Support      Corporate     Sign In 
Support Knowledge Base, Article 643
Product
ImgWriter
Version
1.1.5.0
Title
Error: ImgWriter does not read JPEGProgressive property of image, or JPEGProgressive is always False
Problem
When an image is loaded, ImgWriter always returns the value of the JPEGProgressive property as True, regardless of the actual value. JPEGProgressive is a write-only property; an ImgWriter script can successfully change JPEGProgressive to False, but the property is always read as True when the image is loaded again.
Solution
When an image is loaded by ImgWriter, the value of JPEGProgressive is always read as True.

Set saImg = Server.CreateObject("SoftArtisans.ImageGen")
saImg.LoadImage "C:\image.jpg"
'this value will always be TRUE after the image is loaded
response.Write saImg.JPEGProgressive 

The value of JPEGProgressive can be set to False, and its value will be read accurately as False because ImgWriter does not need to look at the image itself to return a value for the property.

saImg.JPEGProgressive = False
saImg.SaveImage saiFile, saiJPG, "C:\image_new.jpg"
'this value has been changed successfully to FALSE
response.Write saImg.JPEGProgressive

When ImgWriter sets the JPEGProgressive property, the change will be reflected in how the image is saved or rendered in a browser, but the JPEGProgressive property will always be read as True by ImgWriter regardless of the actual value.
Created : 5/30/2003 3:38:09 PM (last modified : 6/2/2003 12:58:05 PM)
Rate this article!
 
Comments