Jim Bufalini wrote:

FUNCTION ReduceImage pData
  local tWidth,tHeight
  constant kMaxSize = 800
  constant kJpegQuality = 60
  -----
  put the jpegquality into tJpegQuality
  create invisible image "Temp"
  set the text of image "Temp" to pData
  put the formattedwidth of image "Temp" into tWidth
  put the formattedheight of image "Temp" into tHeight
  -----
  IF tWidth > kMaxSize OR tHeight > kMaxSize THEN
    IF tWidth > tHeight THEN
      set the width of image "Temp" to kMaxSize
      set the height of image "Temp" to round(tHeight * (kMaxSize/tWidth))
    ELSE
      set the height of image "Temp" to kMaxSize
      set the width of image "Temp" to round(tWidth * (kMaxSize/tHeight))
    END IF
    set the jpegquality to kJpegQuality
    export image "Temp" to pData as JPEG
  END IF
  delete image "Temp"
  set the jpegquality to tJpegQuality
  return pData
END ReduceImage

Thanks. This is similar to what I had in mind for the final output, only I was going to just save enough imagedata to account for a decent printout at the document's actual size. The problem is though -- what is the document's actual size?

--
Jacqueline Landman Gay         |     [email protected]
HyperActive Software           |     http://www.hyperactivesw.com
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to