Path: ...!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Rich Newsgroups: sci.crypt Subject: Re: [file2png] Convert (encrypted) binary data to .png images and back Date: Tue, 31 Dec 2024 23:15:00 -0000 (UTC) Organization: A noiseless patient Spider Lines: 33 Message-ID: References: Injection-Date: Wed, 01 Jan 2025 00:15:01 +0100 (CET) Injection-Info: dont-email.me; posting-host="8c10bf53f7fd2c88970ece96e6e64bf0"; logging-data="2571415"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Y0mWmFO4JFqji4QVCmUu2" User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64)) Cancel-Lock: sha1:12S0Uxeyw72TItWdefGGR7jOTCE= Bytes: 2369 Stefan Claas wrote: > Rich wrote: >> Stefan Claas wrote: >> > Hi all, >> > >> > here is a Python3 implementation of my file2png program, available >> > here: https://github.com/706f6c6c7578/file2png >> > >> > Hope you find it useful, when for example uploading such images to >> > platforms like X, which does not compress .png images, as I have >> > tested! >> >> PNG compression is lossless, so it should not matter if the PNG is >> compressed, you should get back the same bytes that went in. >> >> Now, if instead you mean "rescale" (reduce/increase size) or other >> transformations (RGBI to RGB or RGB to indexed) then those >> transformations may alter the content such that you do not get back >> what you put in. > > I remember taht facebook/Meta did something with .png in the past and > it did not work, but it was not rescaling etc. There's only one compression algorithm in the PNG standard, zlib, which itself is lossless. But there are a lot of "transformations" that could be done on a PNG that would result in modification of the actual image bytes inside. Given the potential cost savings to a company with the scale of facebook/meta from even a few percentage of saved space on uploaded PNG's from "optimizing" them, it would not be surprising to learn they were doing something to them that changed the stored bytes.