You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Firebox the saveCanvas function saves a file with dimension of stacksize (width and height of the image), whereas in Chrome it seems to includes a black band around the outside, presumably canvassize which is currently defined as stacksize + canvasspace.
Update: Behaviour now appears consistent across browsers (perhaps issue identified above was a caching problem): both Firefox and Chrome save canvas based on canvassize (which is what you'd expect from the code). Ideally the save function should only export stacksize as per the following.
Current behaviour
When users click on "save image" button saveCanvas function exports canvassize which is currently defined as stacksize + canvasspace.
Desired behaviour
When users click on "save image" button they should ideally be able to export the area currently defined as stacksize, excluding the canvasspace area which has been included to allow space for save button, sliders, dropdown menus and other user interface features to customise and adjust the image.
This could possibly be addressed by splitting into two phases and/or screen areas:
A configuration, including inputting image URLs and adjusting settings;
Image canvas, for previewing image and showing what would be saved with the "save image" button.
The text was updated successfully, but these errors were encountered:
jwyg
changed the title
Fix discrepancy between image save function in Firefox and Chrome
Fix discrepancy between image save function in Firefox and Chrome 🐜
Jun 17, 2020
jwyg
changed the title
Fix discrepancy between image save function in Firefox and Chrome 🐜
Update save image function to export image without surrounding border 🐜
Jun 18, 2020
solve and closePublicDataLab#9
The p5 canvas is an HTML object like as buttons and input form.
We can therefore position it where we want in the page.
Therefore the canvas size now is equal to the stacksize.
when we create it, we incapsulate it ina a variable (line 36) and then we position it in the page (line 37)
In Firebox thesaveCanvas
function saves a file with dimension ofstacksize
(width and height of the image), whereas in Chrome it seems to includes a black band around the outside, presumablycanvassize
which is currently defined asstacksize
+canvasspace
.Update: Behaviour now appears consistent across browsers (perhaps issue identified above was a caching problem): both Firefox and Chrome save canvas based on
canvassize
(which is what you'd expect from the code). Ideally the save function should only exportstacksize
as per the following.Current behaviour
When users click on "save image" button
saveCanvas
function exportscanvassize
which is currently defined asstacksize
+canvasspace
.Desired behaviour
When users click on "save image" button they should ideally be able to export the area currently defined as
stacksize
, excluding thecanvasspace
area which has been included to allow space for save button, sliders, dropdown menus and other user interface features to customise and adjust the image.This could possibly be addressed by splitting into two phases and/or screen areas:
The text was updated successfully, but these errors were encountered: