image compress

Chipp Walters chipp at chipp.com
Wed Mar 23 21:02:19 EST 2005


Hi Rick,

Try this (not tested but I think it should work)

on mouseUp
   answer file "image to compress"
   if it is empty then exit to top
   put it into tFileName1
   put tFileName1 & ".gz" into tFileName2
   put compress(URL ("binfile:" & tFileName1)) into \
     URL ("binfile:" & tFileName2)
end mouseUp

then...

on mouseUp
   answer file "image to decompress"
   if it is empty then exit to top
   set the filename of img 2 to \
     decompress(URL("binfile:" & it))
end mouseUp

Or if you want to actually put the file INTO the image:

put decompress(URL("binfile:" & it)) into img 2

hope that helps,

Chipp


Rick Rice wrote:
> I've been trying to compress images
> When I use the following to compress I do get a file.
> 
> on mouseUp
>   answer file "image to compress:"
>   if it is empty then exit mouseup
>   put it into timage
>   put compress(timage) into URL "binfile:/CSMLS Moncton/DATA/AREA"
> end mouseUp
> 
> But when I decompress with the following, the display (card image 2) is 
> blank.
> 
> put url ("binfile:" & tPath) into encryptedImage
> put decompress(encryptedImage) into pictData
> put pictData into card image 2 of cd "display"


More information about the metacard mailing list