{"id":16164131,"url":"https://github.com/tleguern/lgpng","last_synced_at":"2025-05-07T16:53:57.610Z","repository":{"id":44324497,"uuid":"155474104","full_name":"tleguern/lgpng","owner":"tleguern","description":"Low-level PNG library and associated utilities","archived":false,"fork":false,"pushed_at":"2025-02-08T23:07:02.000Z","size":4044,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T12:04:37.454Z","etag":null,"topics":["c","png","png-decoder"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tleguern.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-31T00:22:38.000Z","updated_at":"2025-02-08T23:07:06.000Z","dependencies_parsed_at":"2023-02-10T00:00:26.135Z","dependency_job_id":"2fff1537-f567-4885-93ee-f873469be8ec","html_url":"https://github.com/tleguern/lgpng","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tleguern%2Flgpng","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tleguern%2Flgpng/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tleguern%2Flgpng/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tleguern%2Flgpng/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tleguern","download_url":"https://codeload.github.com/tleguern/lgpng/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252921953,"owners_count":21825632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","png","png-decoder"],"created_at":"2024-10-10T02:45:25.549Z","updated_at":"2025-05-07T16:53:57.567Z","avatar_url":"https://github.com/tleguern.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lgpng\n\nThe lgpng library allows to explore the PNG file format.\nIt is not (for now) intended to actually decode the pixels to display an image.\n\nSome utilities using lgpng are provided in this repository.\n\n## Contents\n\n1. [Install](#install)\n2. [pnginfo](#pnginfo)\n3. [pngdump](#pngdump)\n4. [pngexplode](#pngexplode)\n5. [pngextract](#pngextract)\n6. [License](#license)\n\n## Install\n\n#### Requires\n\n* C compiler ;\n* zlib.\n\n### Build\n\n    $ ./configure\n    $ make\n    # make install\n\nAlternatively install in your `$HOME/bin`:\n\n    $ ./configure PREFIX=~/\n    $ make\n    $ make install\n\n### Tests\n\nA few regression tests are available when invoking the command:\n\n    $ make regress\n\n## pnginfo\n\nIt is possible to list the chunks in a given PNG file or to request the details of a specific chunk.\n\nExamples:\n\n```\n$ pnginfo -f lena.png -l\nIHDR\nsRGB\nIDAT\nIEND\n$ pnginfo -f lena.png -c IHDR\nIHDR: width: 512\nIHDR: height: 512\nIHDR: bitdepth: 8\nIHDR: colourtype: truecolour\nIHDR: compression: deflate\nIHDR: filter: adaptive\nIHDR: interlace method: standard\n$ cat lena.ong | pnginfo -c sRGB\nsRGB: rendering intent: perceptual\n```\n\nHere is a list of supported chunks:\n\n* PNG specification (Third edition):\n  * IHDR\n  * PLTE\n  * IDAT\n  * IDEN\n  * tRNS\n  * cHRM\n  * gAMA\n  * iCCP\n  * sBIT\n  * sRGB\n  * cICP\n  * tEXt\n  * zTXt\n  * bKGD\n  * hIST\n  * pHYs\n  * sPLT\n  * eXIf\n  * tIME\n  * acTL\n  * fcTL\n  * fdAT\n* Extensions to the PNG specification (Version 1.6.0):\n  * oFFs\n  * gIFg\n  * gIFx\n  * sTER\n* ImageMagick private chunks:\n  * vpAg\n  * caNv\n  * orNt\n* Skitch/Evernote private chunks:\n  * skMf\n  * skRf\n* Microsoft private chunks:\n  * msOG\n* Worms Armageddon private chunks:\n  * waLV\n* GLDPNG private chunks:\n  * tpNG\n\nUnknown chunks can still be listed and queried but only very basic informations will be displayed.\n\nThe `-s` option can be handy if garbage is placed at the beginning of a file. `pnginfo -s` will try to skip said garbage until it finds an acceptable PNG signature.\n\nExample:\n\n```sh\n$ curl https://example.org/file.png | pnginfo -s -l\n```\n\n## pngdump\n\nThis utility dumps a raw chunk from a PNG file or optionally its data segment.\n\nExample - extract the original gif from a msOG chunk:\n\n```\n$ pngdump -o 11 -f samples/msOG.png msOG | file -\n/dev/stdin: GIF image data, version 89a, 32 x 32\n```\n\nExample - extract the original png from a skRf chunk:\n\n```\n$ pngdump -o 16 -f samples/skRf.png skRf | file -\n/dev/stdin: PNG image data, 512 x 512, 8-bit/color RGBA, non-interlaced\n```\n\n## pngexplode\n\nThis utility crudely split a PNG stream into multiple files, one per chunk.\n\nExample:\n\n```\n$ pngexplode -f nsfw25-highres.png\n$ ls -1 png_*\npng_000_sig.dat\npng_001_IHDR.dat\npng_002_gAMA.dat\npng_003_iCCP.dat\npng_004_cHRM.dat\npng_005_pHYs.dat\npng_006_IDAT.dat\npng_007_IDAT.dat\npng_008_IDAT.dat\npng_009_IDAT.dat\npng_010_IDAT.dat\npng_011_IEND.dat\n```\n\n## pngextract\n\nExtract a PNG file embedded in something else.\n\nExample - extract a PNG file from an OLE document embedded inside a cpIp chunk:\n\n```\n$ python oledump.py -a -d -s 182 some-ole.dat | pngextract | file -\n/dev/stdin: PNG image data, 941 x 400, 8-bit/color RGBA, non-interlaced\n```\n\n## License\n\nAll the code is licensed under the ISC License.\nIt's free, not GPLed !\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftleguern%2Flgpng","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftleguern%2Flgpng","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftleguern%2Flgpng/lists"}