"squirreltown" wrote:
RokuKC - "yes, it doesn't surprise me that the time to convert to PNG + upload PNG is greater than the time to upload raw pixel data, at least for larger bitmap dimensions and/or on lower end hardware."
I'm sure that means something.
Kevin was comparing two operations:
1. Convert bitmap to png, then upload the (relatively small) png
2. Convert bitmap to bytearray, then upload the (relatively large) bytearray (= raw pixel data)
He's observing that converting the bitmap to png is time-consuming, and that the conversion in #1 may overwhelm the savings in the upload time. But uploading a small file will be faster than uploading a large file. Uploading 3 MB will take twice as long as uploading 1.5 MB, no matter what the bytes represent.
The server receives the exact same bytes that are in the file that you passed to AsyncPostFromFile. There's no such thing as "sending a file as text, not as an image file". Data sent out on the network is just bytes, they're not treated differently depending on the file type.
Like EnTerr, I'm puzzled about what your invocation of ImageMagick is doing, but I don't think it's necessary. GetPng has already converted the file to png; you don't need to convert it again. (jpg is not involved anywhere.) That's probably why your png upload is taking so long; your script is doing this long convert operation before it tells the Roku that the transfer is done.
--Mark