N
N
Newbie Ivanovich2019-09-16 06:47:17
PNG
Newbie Ivanovich, 2019-09-16 06:47:17

How to increase png file without interpolation in react-native+expo?

There is a qrcode in png format with a size of 32 * 32 pixels. when displayed in the Image component with an increase, the image loses its quality. Enlarge the image without losing quality.
how to do it?
result example

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
PrAw, 2019-09-16
@NovichokIvanovich

increase the resolution by exactly 2(*2*2*2...) times, this will avoid distortion due to color transitions at the pixel boundaries.
Well, as posters said, "Set the image-rendering property to image-rendering: pixelated;"
https://facebook.github.io/react-native/docs/image.html
resizeMethod: 'resize'
Most likely this mode with the correct resolution (increase by a power of two times) will give a better picture.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question