Saving canvas with 300dpi (imagemagick) and todataurl / base64 -


i have problem saving canvas. think because canvas large. have asked here:

elements on canvas disappear w/ jsfiddle

canvas.todataurl() large canvas

… no success.

my problem next:

i have canvas example these dimensions: 1123x1965 pixels , need resize 29.7x52 centimeters , put them in 300dpi.

my rational follows:

  • after edited template, convert full size , save png image actual size in pixels, multiplied 300 dpi. made calculation:

29.7 centimeters: 29.7*300 = 8910

52 centimeters: 52*300 = 15600

the problem on using canvas disappear. please this: elements on canvas disappear w/ jsfiddle

and todataurl function don’t work: canvas.todataurl() large canvas

  • then use library imagemagick convert 300 dpi, command: convert test.png -units pixelspercentimeter -density 300 test2.png

anyone can me?

thank you.

just divide have on 2.54 pixels based on inches. although, more correct term ppi instead of dpi (as dots on paper behave little different pixels on screen).

29.7 cm * 300 ppi / 2.54 = 3508 pixels  52.0 cm * 300 ppi / 2.54 = 6142 pixels 

(are sure 52 cm correct ? (a4 short side x2, ie a3, 42 cm)).


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -