Re: Reading OSX mail attachments
Dave, Thanks, but that didn't work either. What I get now is a completely white image, and when I look at it's imageData it's zero length. On Mar 12, 2007, at 11:23 AM, Dave Cragg wrote: put base64Decode(theattachment) into image "myImage" Best Regards, Timothy R. Ponn ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Reading OSX mail attachments
On 12 Mar 2007, at 14:15, Tim Ponn wrote: But, when I open the file within rev...strip out all the text ahead of the attachment...strip out all the junk past the end of the attachment...then set the image data of an image to base64Decode (theattachment)...I get mostly a black image with a sliver of hash on the left side. When you say "set the image data of an image" do you mean the imageData property. I don't think this will work with jpeg data. The imageData format is an iternal pixel by pixel format used by Rev with no compression. Instead, try something like this: put base64Decode(theattachment) into image "myImage" Cheers Dave ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Reading OSX mail attachments
Ken, Yes, I do have the image in my rev stack set to the same as the original jpeg image..in this case 350 x 232. For what it's worth, once I isolate (theAttachment), I also put base64Decode(theAttachment) into a field. I then opened the original Pool Table.jpg with a text editor. They look identical and they are the same length...well...the jpg file has 3 extra bytes, but I would attribute this to eof. Because the slice of hash is about 1/16 the width of the image that I end up with (the balance being black), is it possible that base64Decode is actually hex, and not binary? Maybe coincidence? On Mar 12, 2007, at 10:51 AM, Ken Ray wrote: On Mon, 12 Mar 2007 10:15:59 -0400, Tim Ponn wrote: Hello, Thanks for your help, but I'm still having problems displaying the image correctly. This snippet from the .eml file says it's base 64: --FTG_BOUNDRY Content-Type: image/jpeg; name="Pool Table.jpg" Content-disposition: attachment Content-transfer-encoding: base64 But, when I open the file within rev...strip out all the text ahead of the attachment...strip out all the junk past the end of the attachment...then set the image data of an image to base64Decode(theattachment)...I get mostly a black image with a sliver of hash on the left side. I have got to be missing something basic here! Do you know ahead of time the size of the image? Because before you set the imageData of an image, you need to have the rect of the image be correct otherwise you'll get garbage. I would suggest pumping the base64Decode(theattachment) to a binary file called "Pool Table.jpg" and then importing that image from disk (or set the filename of an empty image to the file path). Just my 2 cents, Ken Ray Sons of Thunder Software, Inc. Email: [EMAIL PROTECTED] Web Site: http://www.sonsothunder.com/ Best Regards, Timothy R. Ponn ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Reading OSX mail attachments
On Mon, 12 Mar 2007 10:15:59 -0400, Tim Ponn wrote: > Hello, > > Thanks for your help, but I'm still having problems displaying the > image correctly. This snippet from the .eml file says it's base 64: > > --FTG_BOUNDRY > Content-Type: image/jpeg; name="Pool Table.jpg" > Content-disposition: attachment > Content-transfer-encoding: base64 > > But, when I open the file within rev...strip out all the text ahead > of the attachment...strip out all the junk past the end of the > attachment...then set the image data of an image to > base64Decode(theattachment)...I get mostly a black image with a > sliver of hash on the left side. > > I have got to be missing something basic here! Do you know ahead of time the size of the image? Because before you set the imageData of an image, you need to have the rect of the image be correct otherwise you'll get garbage. I would suggest pumping the base64Decode(theattachment) to a binary file called "Pool Table.jpg" and then importing that image from disk (or set the filename of an empty image to the file path). Just my 2 cents, Ken Ray Sons of Thunder Software, Inc. Email: [EMAIL PROTECTED] Web Site: http://www.sonsothunder.com/ ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Reading OSX mail attachments
Hello, Thanks for your help, but I'm still having problems displaying the image correctly. This snippet from the .eml file says it's base 64: --FTG_BOUNDRY Content-Type: image/jpeg; name="Pool Table.jpg" Content-disposition: attachment Content-transfer-encoding: base64 But, when I open the file within rev...strip out all the text ahead of the attachment...strip out all the junk past the end of the attachment...then set the image data of an image to base64Decode (theattachment)...I get mostly a black image with a sliver of hash on the left side. I have got to be missing something basic here! On Mar 9, 2007, at 4:52 PM, Brent Anderson wrote: Hello. I've done something similar with audio clips and those were in base 64 format. A quick base64decode function call should do the trick. Thanks, Brent Anderson Christa McAuliffe Space Education Center On Mar 9, 2007, at 9:51 AM, Ken Ray wrote: On Fri, 9 Mar 2007 09:55:32 -0500, Tim Ponn wrote: Hello all, I have a situation where customer orders come to me via email with a photo attachment. It occurred to me that I could use rev to create a db front end that could be pointed at the appropriate mailbox folder and then have it extract each message. Then, each message becomes a record in my db. Extracting the data is a piece o cake. Then I come to the attachment. Apple apparently uses a compression technique to store the image (jpg, bmp, whatever) within each individual message. Has anybody fiddled with reading and displaying these attachments? Any thoughts? Ideas? Laughs? ;=) Well, as a last resort you could leave it in Mail, and then use AppleScript to get at the message and its attachments. Barring that, I haven't had to read embedded mail attachments directly, but I'd assume they are either BinHexed or AppleDouble encoded... Ken Ray Sons of Thunder Software, Inc. Best Regards, Timothy R. Ponn ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Reading OSX mail attachments
Hello. I've done something similar with audio clips and those were in base 64 format. A quick base64decode function call should do the trick. Thanks, Brent Anderson Christa McAuliffe Space Education Center On Mar 9, 2007, at 9:51 AM, Ken Ray wrote: On Fri, 9 Mar 2007 09:55:32 -0500, Tim Ponn wrote: Hello all, I have a situation where customer orders come to me via email with a photo attachment. It occurred to me that I could use rev to create a db front end that could be pointed at the appropriate mailbox folder and then have it extract each message. Then, each message becomes a record in my db. Extracting the data is a piece o cake. Then I come to the attachment. Apple apparently uses a compression technique to store the image (jpg, bmp, whatever) within each individual message. Has anybody fiddled with reading and displaying these attachments? Any thoughts? Ideas? Laughs? ;=) Well, as a last resort you could leave it in Mail, and then use AppleScript to get at the message and its attachments. Barring that, I haven't had to read embedded mail attachments directly, but I'd assume they are either BinHexed or AppleDouble encoded... Ken Ray Sons of Thunder Software, Inc. Email: [EMAIL PROTECTED] Web Site: http://www.sonsothunder.com/ ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Reading OSX mail attachments
On Fri, 9 Mar 2007 09:55:32 -0500, Tim Ponn wrote: > Hello all, > > I have a situation where customer orders come to me via email with a > photo attachment. It occurred to me that I could use rev to create a > db front end that could be pointed at the appropriate mailbox folder > and then have it extract each message. Then, each message becomes a > record in my db. > > Extracting the data is a piece o cake. Then I come to the > attachment. Apple apparently uses a compression technique to store > the image (jpg, bmp, whatever) within each individual message. Has > anybody fiddled with reading and displaying these attachments? Any > thoughts? Ideas? Laughs? ;=) Well, as a last resort you could leave it in Mail, and then use AppleScript to get at the message and its attachments. Barring that, I haven't had to read embedded mail attachments directly, but I'd assume they are either BinHexed or AppleDouble encoded... Ken Ray Sons of Thunder Software, Inc. Email: [EMAIL PROTECTED] Web Site: http://www.sonsothunder.com/ ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Reading OSX mail attachments
Hello all, I have a situation where customer orders come to me via email with a photo attachment. It occurred to me that I could use rev to create a db front end that could be pointed at the appropriate mailbox folder and then have it extract each message. Then, each message becomes a record in my db. Extracting the data is a piece o cake. Then I come to the attachment. Apple apparently uses a compression technique to store the image (jpg, bmp, whatever) within each individual message. Has anybody fiddled with reading and displaying these attachments? Any thoughts? Ideas? Laughs? ;=) Thanks in advance! Best Regards, Timothy R. Ponn ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution