-
Notifications
You must be signed in to change notification settings - Fork 232
Return watermarked image as JPEG #42
Comments
I am having similar issues, as when jpegs get converted to png's, the compression is horrible. watermarkjs/lib/canvas/index.js Line 8 in bb3d021
That function should be designed to accept the following: I will be working on a fork in the next few days. API for reference Edit: This may not help the exif data issue, I do not think canvas retains that kind of information. But how I got around the exif issue is I just rotated the canvas accordingly based off exif-js library Here is a snippet of code for reference:
|
Makes sense to me. 👍 @brianium - I'm not clear on how the
Once converted to a canvas the exif data will be lost unless saved and written back to the image file (if possible depending on the image type). Even if I save the exif data prior to watermarking I cannot write it back to the image file since a PNG is currently always being returned. |
By the way thanks @skliffmueller as this was the line of code I was looking for and was alluding me. 🍻 watermarkjs/lib/canvas/index.js Line 8 in bb3d021
|
@davidquon the My thought on using an Let me know if I can answer anything else :) |
Kind of related to #34, the watermarked image is returned as a PNG image object even though the original object was a JPEG. Is there a way to return the watermarked image as a JPEG so EXIF data can be written to it?
The text was updated successfully, but these errors were encountered: