Danbooru

Twitter .png-Files vs. Pixiv .png-files (Post relationships)

Posted under General

There are posts that are .png-files on Twitter and these get uploaded to Danbooru.
Apparently, these images don't suffer from artifacts like most .jpg-files from Twitter do.

Then there is the same image uploaded on Pixiv. Also as a .png-file but with slightly filesize.

The help:post_relationships wiki doesn't seem too offer a good answer as to what image should be the parent.

So, what's the way to go when a Twitter .png and a Pixiv .png-file should be put in a post relationship. What should be the parent?

It's assumed that the resolution is in both cases identical.

PNGs don’t suffer from compression artifacts like JPEG because PNGs are basically lossless… unless someone decided to reduce the colors to 256 to save some space, which is not lossless.

From help:post_relationships:

Choosing the Best Parent

The Parent Post should be considered in this order:

For identical images

Assuming that the first four items are identical for Twitter vs. Pixiv copies, the following rules apply:

  • Highest resolution. If a picture has been upscaled, the upscaled version should be the child.
  • Largest colorspace. Ex. RGBA32 encodes more data per pixel than RGB24.
  • Most recent active post (post #2613788, post #2227073).
  • Most unaltered metadata for exactly identical images.
    • Especially interesting since Pixiv used to run uploaded JPEGs through the jpegtran optimizer (since August 2013) that reduced filesize by stripping some metadata. In those cases, the Pixiv image should be the child (see post #1502515). Pixiv no longer uses the jpegtran optimizer, so JPEG metadata should be present on most images past 2014-2015 or so.
    • In fairly unique cases, the artist will have metadata present in an image from another site that needs to be manually checked. See here.
  • Best compression. Whichever post has a smaller filesize while retaining the exact same image data is the parent.

If the next four rules don’t help you either, only the “smaller filesize” rule is left. Smaller JPEGs pretty much always come with more artifacts, but PNGs don’t. PNGs with better compression but identical content are usually 20% smaller at best. If the difference is much larger (50% or more), something is up. Either the larger file has unnecessary bloat (sometimes used on other galleries to pretend the image has better quality) or the smaller file was botched in some way and you should check carefully.

If there's no meaningful difference between two posts, then the tiebreaker should be whichever post was uploaded first. A slight change in filesize between two PNG files is not meaningful. Uploaders should be discouraged from uploading duplicates when there's no improvement in actual visual quality.

  • 1