Portable Network Graphics (.png)

W3C Τυπικό

Portable Network Graphics (PNG) is an unencumbered raster graphics file format that supports lossless data compression, indexed colors, and variable alpha channel transparency.

Μετατροπή PNG σε JPG

Δωρεάν μετατροπέας από PNG σε JPG εντός του προγράμματος περιήγησης. Μετατρέψτε αρχεία άμεσα στη συσκευή σας.

Συμπίεση PNG Online

100% ιδιωτική συμπίεση στο πρόγραμμα περιήγησης – τα αρχεία δεν φεύγουν ποτέ από τη συσκευή σας

Επιθεώρηση & Μεταδεδομένα

Τα λειτουργικά συστήματα και τα εργαλεία ανάλυσης αρχείων αναγνωρίζουν τα αρχεία PNG ελέγχοντας την αρχική δυαδική ακολουθία byte:

Επιλέξτε ή σύρετε αρχεία

Επιλέξτε ή αποθέστε αρχεία εδώ

100% ιδιωτική μετατροπή εντός προγράμματος περιήγησης - τα αρχεία δεν φεύγουν ποτέ από τη συσκευή σας

ή επικόλληση Ctrl+V
Εγγύηση Απορρήτου Μηδενικής Μετάδοσης Δικτύου: 0 byte μεταφορτώθηκαν σε εξωτερικούς διακομιστές. Όλη η επεξεργασία πραγματοποιήθηκε τοπικά στο sandbox του προγράμματος περιήγησής σας.

Υπογραφή κεφαλίδας σε επίπεδο byte (Magic Bytes)

Τα λειτουργικά συστήματα και τα εργαλεία ανάλυσης αρχείων αναγνωρίζουν τα αρχεία PNG ελέγχοντας την αρχική δυαδική ακολουθία byte:

ΔΕΚΑΕΞΑΔΙΚΗ ΥΠΟΓΡΑΦΗ (OFFSET 0):

89 50 4E 47 0D 0A 1A 0A

ΑΝΑΠΑΡΑΣΤΑΣΗ ASCII: .PNG....

Τυποποίηση: W3C Recommendation (1996) / ISO/IEC 15948:2004

Τεχνικές Προδιαγραφές

Αρχιτεκτονική ΠεριέκτηChunk-based binary container with 4-byte CRC32 verification per chunk
ΣυμπίεσηDeflate (LZ77 + Huffman coding) with 5 predictive scanline filters (None, Sub, Up, Average, Paeth)
Endianness ByteBig-Endian (network byte order) for chunk lengths, dimensions, and CRCs
Χρωματικοί ΧώροιsRGB, Display P3, Indexed Palette (1-8 bit), Grayscale, Truecolor (24/48-bit)
Κανάλια & ΔομήRGB + Alpha (Up to 16 bits per channel / 64-bit RGBA)
Μέγιστες Διαστάσεις2,147,483,647 x 2,147,483,647 pixels (4-byte unsigned integers)
ΔιαφάνειαFull 8-bit / 16-bit variable alpha transparency channel
Streaming & Προοδευτική ΦόρτωσηAdam7 7-pass interlacing algorithm enables progressive 2D scanline rendering

Τεχνικός Πίνακας Σύγκρισης: PNG έναντι Ανταγωνιστών

Τεχνικό χαρακτηριστικόPNG (Τρέχον)WebPAVIFJPEG
Compression TypeStrictly lossless (Deflate + 2D predictive filters)Lossy (VP8) & Lossless (VP8L)Lossy (AV1 intra) & LosslessStrictly lossy (Discrete Cosine Transform)
Alpha TransparencyFull 8-bit / 16-bit variable alpha channel8-bit alpha channel supported8-bit / 10-bit / 12-bit alpha supportedNo transparency channel support
File Size (Photographs)Large (typically 3x to 6x larger than lossy formats)Small (25%-35% smaller than JPEG)Ultra-small (40%-55% smaller than JPEG)Medium baseline
File Size (Graphics/UI)Extremely compact for screenshots, line art, and textExcellent lossless modeGood, but slower to encodePoor (produces ringing artifacts along sharp edges)
Browser Compatibility100% universal across all browsers since 199897%+ modern browser support93%+ modern browser support100% universal

Συνηθισμένοι Τρόποι Διαφθοράς & Οδηγός Ανάκτησης Hex

⚠️ Image viewer displays 'Fatal error: Not a valid PNG file' or fails to open.

Βασική Αιτία: The first 8 bytes were altered by an ASCII transfer mode (mangling 0x0D 0x0A into 0x0A or 0x0D 0x0D 0x0A).

Ανάκτηση: Open the file in a hex editor and verify the first 8 bytes match '89 50 4E 47 0D 0A 1A 0A'. Restoring these exact 8 header bytes frequently recovers the image.

⚠️ pngcheck reports 'CRC error in chunk IDAT' or image loads partially with corrupt bottom scanlines.

Βασική Αιτία: Bit corruption in the compressed zlib datastream or invalid CRC32 checksum in an IDAT chunk.

Ανάκτηση: Use pngcheck -f or Deflate stream recovery utilities to recalculate valid CRC32 values, or decompress surviving scanlines up to the corrupt block.

⚠️ Image renders fine in desktop viewers but fails in iOS applications.

Βασική Αιτία: iOS expects Apple's proprietary CgBI byte swapped format, or non-standard color space chunks.

Ανάκτηση: Normalize the image using 'pngcrush -revert-iphone-optimizations' to restore standard W3C RGBA ordering.

Ανάλυση Ασφάλειας & Διανύσματα Επίθεσης Parser

PNG is widely parsed across all platforms. Modern security concerns center on parser memory exhaustion and ancillary chunk injection.

Γνωστά διανύσματα επίθεσης

  • Oversized tEXt and zTXt metadata chunks triggering Out-Of-Memory (OOM) denial-of-service in un-sandboxed decoders.
  • Heap buffer overflow vulnerabilities in legacy libpng releases (e.g. CVE-2015-8126 in png_set_PLTE).
  • Pixel flood decompression attacks where an image with small file size declares enormous dimensions (e.g. 100,000 x 100,000 pixels).
  • Steganographic exfiltration hiding encrypted payloads in ancillary private chunks (e.g. eXIf or custom chunk types).

Βέλτιστες αμυντικές πρακτικές: Always validate image dimensions before allocating pixel buffers in memory. Strip non-essential ancillary chunks (eXIf, tEXt) on user uploads using a memory-safe sanitizer.

Ιστορική Αναδρομή & Ορόσημα

2004Standardized internationally as ISO/IEC 15948.
1996PNG 1.0 published as a W3C Recommendation.
1995Created on Usenet comp.graphics as an open replacement for GIF following Unisys's LZW patent fee enforcement.

Κύρια Πλεονεκτήματα

  • Lossless compression guarantees zero pixel degradation or generation loss upon saving.
  • Smooth 8-bit alpha transparency enables clean blending on complex backgrounds.
  • Gamma correction and chromaticity chunks ensure consistent rendering across diverse monitors.

Τεχνικοί Περιορισμοί & Μειονεκτήματα

  • Significantly larger file sizes compared to modern lossy formats like WebP or AVIF for photographic content.
  • No native multi-frame animation in standard PNG (requires APNG extension).
  • High bit-depth (16-bit per channel) creates huge uncompressed in-memory decode buffers.

Ενδιαφέροντα Τεχνικά Στοιχεία

  • The 8-byte magic header was specifically designed to detect CR/LF line ending corruption by FTP transfers.
  • The unofficial recursive acronym for PNG was 'PNG's Not GIF'.
  • Apple uses a proprietary CgBI chunk in iOS app PNGs that reverses RGBA to BGRA for direct GPU rendering.

Συχνές Τεχνικές Ερωτήσεις

Why does a PNG file size sometimes increase when saved in image editors?

Different software suites use varying Deflate compression levels and predictive scanline filter heuristics. Programs like Photoshop frequently append uncompressed color profiles, XMP metadata blocks, and unoptimized IDAT chunk sizes. Dedicated tools like File2File Compressor re-evaluate all 5 scanline filters to achieve minimal file size.

What is the difference between PNG-8 and PNG-24?

PNG-8 uses an indexed color palette of up to 256 colors (similar to GIF), producing very small files suitable for simple icons. PNG-24 supports 16.7 million colors (Truecolor 8 bits per channel), with PNG-32 adding an 8-bit alpha transparency channel.

Why does PNG have 5 predictive scanline filters?

Deflate compresses repeated byte patterns. Because photographic or gradient pixel values change gradually, PNG filters each scanline (None, Sub, Up, Average, Paeth) by calculating differences between adjacent pixels. This transforms gradient data into strings of near-zero bytes that compress dramatically better under Deflate.

Does PNG support CMYK color spaces for commercial printing?

No. The official W3C PNG specification deliberately restricts color types to Grayscale, Indexed, and RGB. Professional print workflows requiring CMYK must use TIFF or PDF containers.