fabricjs / fabric.js

Javascript Canvas Library, SVG-to-Canvas (& canvas-to-SVG) Parser
http://fabricjs.com
Other
29.06k stars 3.51k forks source link

Not an issue but need help #3574

Closed amitgaur208 closed 7 years ago

amitgaur208 commented 7 years ago

I have used fabric.js for designing tshirts. I have created an bounding rectangle on tshirt to create design by users. But for printing i need onlythe bounding rectangle design with 300 dpi to print.

So i don't know how to create 300 dpi files to print t shirts and what format of output file should i use. Please help!!

Version

1.7.2

Test Case

http://jsfiddle.net/fabricjs/Da7SP/

Steps to reproduce

Expected Behavior

Actual Behavior

asturur commented 7 years ago

Hello, thanks for posting.

If you need help or information about fabricJS please try our docs http://fabricjs.com/docs Or try on StackOverflow forum.

If you think you found a bug in the code or a strange behavour of some feature then create a basic jsfiddle that demonstrate the problem and explain it.

If you want to propose a feature please explain the use case for this feature, how it should work and why it would be usefull and if some other library / application already make use of that.

Issue different from those will be closed automatically.

suncha-ng commented 7 years ago

Hey !

Sorry for my English.

If you want save 300dpi files (PDF or JPG) your canvas must have real size

eg. A4 Portrait

3307 x 4677 real size for export 517.576 x 732 user screen for editing

amitgaur208 commented 7 years ago

But actual pixel sized canvas takes forever to load.. I mean if i am designing banner of 10ftx5ft.

According to you canvas size should be 3001012 X 300512 36000X18000 in pixels.

Its not working on my website.

asturur commented 7 years ago

it won't work with current technologies. 36000x18000x4byte per pixel is 2.6GigaByte of data. Forget it. If you have vector arts you can output a SVG, then search someone that can print them reliably. Canvas is maybe ok up to 16000x16000 in extreme conditions and super slow anyway.

You can tile the image in slices if you want to, using the viewport and multi rendering.

suncha-ng commented 7 years ago

Effectively with such large sizes ... I never climb to 15000 pixels I apply a reduction coefficient for sizes greater than 3000 pixels A0 -> 150dpi A2 -> 200dpi A4 -> 300dpi

amitgaur208 commented 7 years ago

@asturur Thanks for the response.

According to you i can load max. 16000x16000 canvas size.

amitgaur208 commented 7 years ago

Thanks @bodeva