Michael,
> thanks for you answer. I doubt that the method you mentioned
> would work. Because how would the cell phone know about how
> wide or high the image would be? I mean there must be some
> information in the gif file other than the color values of
> all the pixels in a row ...
Well, for starters you wouldn't grab each pixel's color and convert to a hex value
then just stick them into one long linear list, you'd use nested linear lists so that
in essence you're making an array:
on convertPixelDataToHex ( aImage )
tImageWidth = aImage.width
tImageHeight = aImage.height
tPixelData = []
repeat with iRow = 1 to tImageHeight
tRow = []
repeat with iColumn = 1 to tImageWidth
tPixelRGB = aImage.getPixel( (iRow - 1),(iCol - 1) )
tPixelHex = tPixelRGB.hexString()
tRow.add(tPixelHex)
end repeat
tPixelData.add(tRow)
end repeat
return tPixelData
end convertPixelDataToHex
So using a technique like the above you would now have the hex data stored in an
"array" (again, just lists within a list) and tPixelData.count would tell you the
image's height and tPixelData[1].count would tell you the image's width. But still,
I'm not 100% clear on what is required for SMS picture messages so I may still be off
the mark with respect to your exact requirements.
> I know that the PHP methods that do the job are unpack() and implode()
Well, implode() just takes the entries out of an array and "strings" them using
character delimiters between items so you should be able to write a Lingo implode
handler if needed. Then unpack() does the reverse, recreating the original array from
that comma delimited string - again, entirely possible to recreate in Lingo.
> Is there a way to get the binary content of the gif file as it is?
Well, the image property of a member gives you binary image data, maybe that would
suffice in itself without using getPixel() and then converting to hex strings. Either
import the file into a member or link externally to it then get the image of that
member.
Sorry that I can't provide more specific information, but as I said I'm a bit ignorant
on SMS messaging and its requirements. Hope the above helps.
Cheers,
Tom Higgins
Product Specialist - Director Team
Macromedia
[EMAIL PROTECTED]
...
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL
PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping
with programming Lingo. Thanks!]