Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timed out receiving file #234

Closed
FransM opened this issue May 5, 2020 · 6 comments
Closed

Timed out receiving file #234

FransM opened this issue May 5, 2020 · 6 comments

Comments

@FransM
Copy link

FransM commented May 5, 2020

I uploaded a png image file of 100x118 pixels (attached)
100px-Tux
. When uploading I selected RGB565.
After doing so I wanted to download the file back to my system to see how the file actually looks, but it failed with a "Timed out receiving file" message. The remainder of the file was shown in the terminal window.
I would expect that as long as data is received no timeout would occur.

@gfwilliams gfwilliams transferred this issue from espruino/Espruino May 5, 2020
@gfwilliams
Copy link
Member

gfwilliams commented May 5, 2020

Hi - if you've got issues with the IDE, please could you post them into the IDE's GitHub repo? https://github.com/espruino/EspruinoWebIDE/issues

I just transferred this one over.

Which IDE are you using? espruino.com/ide, or the Chrome app. I thought we'd fixed this issue.

But just so you know, when you download you'll get an RGB565 file with a custom header so you won't be able to load it directly on your computer. The easiest preview is the preview you get in the upload dialog.

@FransM
Copy link
Author

FransM commented May 5, 2020

Hi Gordon,
Thanks for transferring the issue.
I am using https://www.espruino.com/ide/
browser is chromium
Version 81.0.4044.122 (Official Build) Built on Ubuntu , running on Ubuntu 18.04 (64-bit)

Reason for trying to download is that I am rendering with
g.drawImage(require("Storage").read("tux.img"));
This gives me an image at 0, 0.
I was wondering if I could control the initial position by editing the img file (e.g. if the contents of an image file is similar to an Image Object).

Also downloading it could be useful if at some point I have to restore it (or if I want to release my app)

Edit: triggered by the previous comment I installed the chromium app. However that one does not have the icon to download files. It only has the folder, floppy and chip icons

@gfwilliams
Copy link
Member

gfwilliams commented May 5, 2020

Ok, thanks. I'll look into it.

This gives me an image at 0, 0.

Did you just try g.drawImage(require("Storage").read("tux.img"),x,y); where x and y are the start locations?

@FransM
Copy link
Author

FransM commented May 5, 2020

This gives me an image at 0, 0.

Did you just try g.drawImage(require("Storage").read("tux.img"),x,y); where x and y are the start locations?

Not when I wrote it, but afterwards I did and that works for me. Haven't found a way to obtain the dimensions of an image (on disk) though. I'd like to have my image horizontally centered.
Basically I was thinking of a skinned clock where one could upload ones own skin

@gfwilliams
Copy link
Member

gfwilliams commented May 5, 2020

The width and height are in the first and second byte. So:

var img = require("Storage").read("tux.img");
var w = img.charCodeAt(0);
var h = img.charCodeAt(1);

@ayusun
Copy link

ayusun commented Jun 30, 2020

This happened to me too.
I was dumping the raw data onto a file, which I later wanted to analyse on PC, but got this time out :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants