-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Black Images #84
Comments
Hi! |
Locking the package version to |
Interesting, the issue was present on 1.0.12 for me. However the black is resulting from jpegs not PNG. |
@springiemedia black on JPEG? There is no transparency on JPEG, so what the black is replacing? |
I am essentially working with stock images, none of these have been taken with a newer phone or device to my knowledge. Current Package version : 1.0.13 => Transparency is replaced by a Black backgrounds on PNG Secondly, 1.0.13 seems to have caused an issue for PNG encoding on my end. At the moment => JPEG files are not causing me an issue. |
Hi everyone, |
Thanks for raising this issue. I am looking into the problem. |
Hi @Donaldcwl, |
@Donaldcwl do you still need help with this issue? |
Hi all, the issue has been fixed in v1.0.14. |
@Donaldcwl Hi, seems working on MacOS BS+Chrome and Windows10+Chrome, thanks! |
1.0.14 do not fix this at all. |
@xmd5a This black image issue we fix here is related to transparent PNG image only, isn't it? |
@Donaldcwl see this. Issues appears on JPEG too (I didn't faced this case). |
@xmd5a @springiemedia, Would you mind to upload the JPEG images that you have encountered this issue? Thanks. |
@Donaldcwl I am having a similar issue with images being cut off at the bottom when the original file is over 1.6 mb. The next is the compressed file pulled from our storage location. This last one is a screen shot of the a portion of the web page that uses the compressed file. The image should be just as tall as the partial image to the left. Also, when we use the original file in your demo web page it works fine. It does not just happen with this one file. we tried multiple files with different sizes. the problem starts at 1.6mb but is really noticeable when the file is greater than 1.97mb. What additional information do you need? |
@Donaldcwl sorry for the delay, not the best photo but this one results in a black image: Also if it helps the image brings up and error and won't load in Photoshop CS6 "Could not complete your request because JPEG Marker segment length is too short (the file may be truncated or incomplete)" It does however open fine in other programs, such as MS Paint. |
Hello folks! Now a bit further explanation: So, my first attempt as suggested was to use the Pica library, set a max-width to reduce the canvas before using the crop. However, there was no file compression for the blob, and I was getting a significantly large file. Well, in the end, for those that are fighting with this as I was, what fixed my problem was to set a size limit with the lib that Pica recommends: https://www.npmjs.com/package/image-blob-reduce Hope it can help someone. Ps: In this issue nodeca/pica#199, there is a comment saying a possible workaround for this. |
Thanks for the sample images and useful information. |
Just so you are aware this also occurs on Samsung S20's, so it looks like it could be a canvas limit on iOS and Android. Perhaps due to the newer phone camera's having higher megapixel cameras leading to larger file sizes. |
This is happening for me with a JPEG in Firefox 87 on macOS Big Sur. The file is unfortunately too large to upload here or any of the free sites I've found for image hosting, so not sure how to pass it along as test data. It's the 80 MB version of the blue marble image from NASA, if that helps. e: I take that back, this appears to be happening with ALL JPEGs now, and neither 1.0.12 or 1.0.14 seems to resolve it. |
Do you have a link to the 80 MB image you used? I was unable to reproduce this with the few JPEGs I tried on the package demo site on Firefox 87.0 on macOS Big Sur 11.2.3. |
Hi @Donaldcwl, I see similar issue on two user's device using
Issue: Original file was: 1117740 bytes Impacted device info - gathered using Sentry:
User-2 with similar issue
Have also verified, user's The compression is working fine on many other users using various devices and mostly chrome. |
fixed in v1.0.15 |
Recently, this package has started producing black images from a number of newer devices e.g. Samsung s20 ultra.
The text was updated successfully, but these errors were encountered: