react-native-image-resizer icon indicating copy to clipboard operation
react-native-image-resizer copied to clipboard

Image Quality After Resize

Open brunolemos opened this issue 8 years ago • 11 comments

The quality is OK but clearly reduced, specially the color and contrast, please open the links:

Original Resized

Any way to improve that? I see similar outputs when using https://github.com/ivpusic/react-native-image-crop-picker

ImageResizer.createResizedImage(uri, 1000, 1000, 'JPEG', 100, 0)

brunolemos avatar Sep 15 '17 06:09 brunolemos

I believe I had a Same Issue . Image Quality Become Poorer @4ian

ZainaliSyed avatar Dec 17 '17 03:12 ZainaliSyed

Same issue here. When i rotates an image multiple times quality become poorer @brunolemos

anoopmm avatar Dec 20 '17 16:12 anoopmm

Is this happening with PNG with the image format? Can you try? :)

4ian avatar Dec 20 '17 19:12 4ian

No i am using jpeg

anoopmm avatar Dec 21 '17 04:12 anoopmm

Yes I understand, but is the same quality problem happening when you try with PNG? Please use PNG, do the rotation of the image multiple times and let me know if there is the same issue :) I try to undersand if the problem comes from the image format.

4ian avatar Dec 21 '17 07:12 4ian

Anyone else having this issue? My images after resize are drastically reduced in quality. When selecting an image from my camera roll (iOS) the image is proportionally the same, but very blurry. Thoughts?

wincod75 avatar Mar 16 '18 04:03 wincod75

@wincod75 If you are using react-native-image-picker , you need to change quality prop to 1.

ZainaliSyed avatar Mar 16 '18 06:03 ZainaliSyed

@ZainaliSyed It's set to default to 1.0, doubt that's the issue. Testing on emulator and device, placeholder image is high res, anything uploaded through the resizer/picker gets fuzzy.

wincod75 avatar Mar 16 '18 22:03 wincod75

It is the expected behavior, JPEG is a lossy format, so multiple mutations involve degradations.

EDIT: mutation = open +edit + save + close.

aMarCruz avatar Apr 14 '18 19:04 aMarCruz

@wincod75 Did you solve this problem?

qqdayan avatar May 10 '18 09:05 qqdayan

@qqdayan @4ian @anoopmm @wincod75 @ZainaliSyed We had a workaround in iOS that works. (Android works normally for us)

Before we Rotate the first 90 degrees we increase the image Width and Height, then after Rotation we got a nice resolution (The First Rotation) . But the Next 90 degrees Rotations (it doesnt matter how many)before Rotate we had to switch the Width and Height (Witdth = Height and Height = Width) and put that parameters in order to not loose resolution.

More info:

"react": "16.6.0-alpha.8af6728", "react-native": "0.57.4", "react-native-image-resizer": "^1.0.0"

matamicen avatar Nov 07 '18 16:11 matamicen

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 01 '22 21:09 stale[bot]

This issue has been automatically closed. Thank you for your contributions.

stale[bot] avatar Sep 09 '22 03:09 stale[bot]