-
Notifications
You must be signed in to change notification settings - Fork 1.2k
How to tell Canvas.pngStream() that the stream has ended? #351
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
Comments
I setup a gist https://gist.github.com/giacecco/7234364 that simplifies my problem and makes evident what I am not understanding. Please help! |
The PNG stream is underdefined. Maybe try to wrap it in a similar manner: #232 (comment) |
Closing this since it's an old thread, please report back if you still have problems... |
I still have the same problem with jpeg streams. The end event is only triggered when the script ends. This makes it consumming a lot of memory. |
@Etsitpab That does sound like a bug, but I don't think it's the same since JPEG- and PNG-streams are handled very differently. Could you open up a new bug describing your issue? |
@LinusU sorry for the delay, here is the shortest script I could write to reproduce the problem I observed :
And here, the corresponding output:
Where I was expecting something like that:
I'm very interested to know whether you are able to reproduce this behavioror have any hint on what i could do wrong. Thank you for your time and for the great work you're doing, this module is really cool ! |
@Etsitpab, please open a new ticket and put all this information there. |
Output for me:
|
Well, I don't know why it doesn't work. Looks like we are stuck. Thank you very much. 2016-03-07 13:19 GMT+01:00 Linus Unnebäck [email protected]:
|
I'm using OS X without pango installed... |
Ok, do you think that I could be related or that I should try something 2016-03-07 13:33 GMT+01:00 Linus Unnebäck [email protected]:
|
Hmm, I don't think that it's related, but you never know :) |
I tried to uninstall it, but I doesn't make any difference :-( 2016-03-07 13:35 GMT+01:00 Linus Unnebäck [email protected]:
|
Did you run |
No, I have to get back to work, I will try it tonight. thank you very much 2016-03-07 13:41 GMT+01:00 Linus Unnebäck [email protected]:
|
No problem 👍 |
Sorry if this is a stupid question, but I can't find a solution. If I write code like the one you see below:
... the 'end' event of the stream is triggered when the nodejs script exits.
What method of stream or perhaps canvas should I call if I need the stream to end before that, e.g. if I want to use the file that I have just created within the same script?
Moreover, if I create many streams from different canvas, when execution ends only the last of the .png files I have created has content, while all other files have zero length.
Thanks,
Giacecco
The text was updated successfully, but these errors were encountered: