Am I creating lossless PNG images?

smcs :

I am doing image processing in a scientific context. Whenever I need to save an image to the hard drive, I want to be able to reopen it at a later time and get exactly the data that I had before saving it. I exclusively use the PNG format, having always been under the impression that it is a lossless format. Is this always correct, provided I am not using the wrong bit-depth? Should encoder and decoder play no role at all? Specifically, the images I save

  • are present as 2D numpy arrays
  • have integer values from 0 to 255
  • are encoded with the OpenCV imwrite() function, e.g. cv2.imwrite("image.png", array)
Dan Mašek :

PNG is a lossless format by design:

Since PNG's compression is fully lossless--and since it supports up to 48-bit truecolor or 16-bit grayscale--saving, restoring and re-saving an image will not degrade its quality, unlike standard JPEG (even at its highest quality settings).

The encoder and decoder should not matter, in regards of reading the images correctly. (Assuming, of course, they're not buggy).

And unlike TIFF, the PNG specification leaves no room for implementors to pick and choose what features they'll support; the result is that a PNG image saved in one app is readable in any other PNG-supporting application.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Producing lossless video from set of .png images using ffmpeg

From Dev

I am getting following error while creating download png using html2Canvas

From Dev

Am I creating a leak here?

From Dev

I am creating a dictionary in python

From Dev

Creating multiple Kivy Canvas images and exporting to png: How do I do this while managing the unpredictability of kivy.clock?

From Dev

How is PNG lossless given that it has a compression parameter?

From Dev

How does compression of lossless images work?

From Dev

Converting RGB images into lossless video with avconv / ffmpeg

From Dev

Am I creating an object correctly in the header file?

From Dev

What kind of object am I creating here?

From Dev

Am I creating a Bronze or a Silver table?

From

Go: Am I creating too many values?

From

I am creating an email spammer, for an outstanding cause

From Dev

Am I creating memory leaks here?

From Dev

How am I creating a RAW hazard here?

From Dev

Am I creating look at and perspective matrices correcly?

From Dev

I am creating a alert box in android studio

From Dev

I am facing problem in creating a Graph implementation

From Dev

problem with game that I am creating python

From Dev

I am creating an event to identify the Member Status

From Dev

I am fetching images and want save images in single pdf file

From Dev

Lossless VP9 Webm Encoding of PNG Sequence with Alpha in FFmpeg

From Dev

How can the png lossless format have different quality?

From Mysql

I had an error when i am creating a foreign key in laravel

From Dev

Repeating images in a ffmpeg -i %04d.png pattern

From Dev

Exporting Excel tables to PNG images - how do I increase resolution?

From Dev

How can I convert a series of PNG images to a video for YouTube?

From Javascript

How do I show png images based on their names in javascript?

From Dev

How do I convert a TTF into individual PNG character images?

Related Related

  1. 1

    Producing lossless video from set of .png images using ffmpeg

  2. 2

    I am getting following error while creating download png using html2Canvas

  3. 3

    Am I creating a leak here?

  4. 4

    I am creating a dictionary in python

  5. 5

    Creating multiple Kivy Canvas images and exporting to png: How do I do this while managing the unpredictability of kivy.clock?

  6. 6

    How is PNG lossless given that it has a compression parameter?

  7. 7

    How does compression of lossless images work?

  8. 8

    Converting RGB images into lossless video with avconv / ffmpeg

  9. 9

    Am I creating an object correctly in the header file?

  10. 10

    What kind of object am I creating here?

  11. 11

    Am I creating a Bronze or a Silver table?

  12. 12

    Go: Am I creating too many values?

  13. 13

    I am creating an email spammer, for an outstanding cause

  14. 14

    Am I creating memory leaks here?

  15. 15

    How am I creating a RAW hazard here?

  16. 16

    Am I creating look at and perspective matrices correcly?

  17. 17

    I am creating a alert box in android studio

  18. 18

    I am facing problem in creating a Graph implementation

  19. 19

    problem with game that I am creating python

  20. 20

    I am creating an event to identify the Member Status

  21. 21

    I am fetching images and want save images in single pdf file

  22. 22

    Lossless VP9 Webm Encoding of PNG Sequence with Alpha in FFmpeg

  23. 23

    How can the png lossless format have different quality?

  24. 24

    I had an error when i am creating a foreign key in laravel

  25. 25

    Repeating images in a ffmpeg -i %04d.png pattern

  26. 26

    Exporting Excel tables to PNG images - how do I increase resolution?

  27. 27

    How can I convert a series of PNG images to a video for YouTube?

  28. 28

    How do I show png images based on their names in javascript?

  29. 29

    How do I convert a TTF into individual PNG character images?

HotTag

Archive