"squirreltown" wrote:
It works great. Now, if we can just compress it so I could send it somewhere ( err..conveniently). 😄
Add a file type to AsyncPostFromFile? ( it already works, it just sends it uncompressed)
"RokuKC" wrote:"squirreltown" wrote:
It works great. Now, if we can just compress it so I could send it somewhere ( err..conveniently). 😄
Add a file type to AsyncPostFromFile? ( it already works, it just sends it uncompressed)
The PNG pixel data is deflate/zlib compressed using a default setting.
While gzipping the post would no doubt squeeze the file size additionally, I wouldn't expect it to be that significant in the grand scheme of things.
But I suppose it might depend on what type of images you have and what you are doing with them. 🙂
"squirreltown" wrote:
Yes, I've noticed there is (very reasonable) compression, but sending the file takes the same amount of time as sending a byte array, it's not like one would expect for an "attachment".
"RokuMarkn" wrote:"squirreltown" wrote:Sorry, I don't understand what you mean by this.
Yes, I've noticed there is (very reasonable) compression, but sending the file takes the same amount of time as sending a byte array, it's not like one would expect for an "attachment".
"RokuKC" wrote:
The PNG pixel data is deflate/zlib compressed using a default setting.
While gzipping the post would no doubt squeeze the file size additionally, I wouldn't expect it to be that significant in the grand scheme of things.
But I suppose it might depend on what type of images you have and what you are doing with them. 🙂
"EnTerr" wrote:
He meant that in his personal observation, uploading a snapshot taken with GetPng() took about as much time as one done with GetByteArray(). Presumably transferred to a local NAS by unknown means (http PUT?).
BrightScript Debugger> scr = createObject("roScreen"): ? scr.getWidth(), scr.getHeight()
1280 720
#' wait for SS to kick in
BrightScript Debugger> png = scr.getPng(0, 0, 1280, 720): ? png.count()
'Dot' Operator attempted with invalid BrightScript Component or interface reference. (runtime error &hec) in $LIVECOMPILE(58)
BrightScript Debugger> ? png
invalid
"EnTerr" wrote:
@squirreltown, try to be more systematic about such things -
(a) measure time, sizes and
(b) use "divide & conquer" approach, e.g. include pre-saved PNG in your bundle and try uploading that instead of GetPng() one - my money are on it will take the same time. Then we can think what causes delay to your NAS upload