
RokuMarkn
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2016
09:41 PM
Re: Can Roku generate a JPG or PNG file?
"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

squirreltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2016
10:11 PM
Re: Can Roku generate a JPG or PNG file?
"RokuMarkn" wrote:
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
Imagemagik is up-sizing the file and adding a profile. It has nothing to do with this which i why i didn't mention it. This is a minor issue that i simply mentioned, not something that's hanging me up. I appreciate your input.
Kinetics Screensavers

RokuMarkn
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2016
08:15 AM
Re: Can Roku generate a JPG or PNG file?
Well, try removing the convert line and I bet your upload time decreases dramatically.
--Mark
--Mark
- « Previous
- Next »