Releases: TonyBrobston/jpegasus
Allow determineOrientation to receive Blob
Updated determineOrientation
to take File
or Blob
.
Added preserveFileType and transparencyFillColor
In order to keep transparency working on png files, I've added a preserveFileType
option. I noted the limitation in the readme, if this is kept compression will not work; the only way to effect file size will be through changing the dimensions of the image.
Also, when compressing pngs, which also converts them to jpeg; the transparent sections of the image were being replaced with black. I added an option called transparencyFillColor
to allow a color to be passed in. This uses https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle under the hood, so anything it can do, this can do.
Add lastModified and lastModifiedDate to Blob
When File
isn't available, we fall back to Blob
. Blob does not have lastModifed
or lastModifiedDate
properties, so we've added that. This will use Date.now()
to get the current time and that will be used.
Add name to Blob
When File
isn't available, we fall back to Blob
. Blob
does not have name
property, so we've added that. This will grab the name from the original file and preserve it.
Fixed exif promise issue and bumped dependencies
There was an issue where the promise may never resolve when looking for exif orientation for an image. Also GitHub was complaining about security vulnerabilities in the dev dependencies, so I updated them.
Updating docs in npm
1.14.1 Merge pull request #166 from TonyBrobston/update-commitlint-config-co…
Added fixImageOrientation boolean option
I'm am effort to fix orientation correction I'm going to add an option to shut it off. This will help me to troubleshoot and allow people to disable it if it happens to be buggy for them.
Exposed `determineOrientation`.
In an effort to better understand exif orientation and how browsers like Chrome/Firefox potentially rotate/flip an image, I'm exposing determineOrientation
. I'll also add this in jpegasus-demo.
Added returnOriginalIfCompressedFileIsLarger
Added returnOriginalIfCompressedFileIsLarger
option.
Updated Dependencies
Merge pull request #148 from TonyBrobston/update-deploy-scripts Update deploy scripts