Open colossatr0n opened 7 years ago
The png file you save from your browser is created by your browser. Dezoomify just assembles the tiles, and the browser creates a file from the canvas dezoomify filled. Different browsers or differentversions of the same browser may create different files.
The node application uses a node canvas implementation, and saves the result as a jpeg file. Because you name the file result.png doesn't make it a png file.
If you create a clean pull request with file extension detection, that makes dezoomify save a png file when the extension of the output file is .png, then I'll merge it.
What kind of images are you working with? For photographs and paintings, png is usually a poor choice, creating huge files with no visible quality gains.
Thank you for explaining all of that. That makes sense and clears things up. I'm working with high quality scans of old manuscripts and documents. Though the quality of both images is very good, the quality of the PNG that is created when using the Dezoomify website and my browser (Chrome) is better than what the node-application creates. With these scans I need to be able to zoom in quite a bit while retaining quality.
I'm trying to figure out how to retrieve the same file, format, and size that the Dezoomify website gives me by using the node-application. I'm unsure why, but when I use a URL e.g. http//:www.example.com/image on the Dezoomify website, it retrieves a .png with a size of 1.8 MB, but when I use this exact same URL in the node-application with the following codes, I get a .png of size 201 KB and a .jpg of 201 KB:
node dezoomify-node.js "http//:www.example.com/image" "result.png"
OR
node dezoomify-node.js "http//:www.example.com/image" "result.jpg"
Is there a way for me to obtain the same results using the node-application that I'm getting from the Dezoomify website? I'm trying to get the node-application to retrieve the 1.8 MB .png file.