Image Inverter
Choose a picture, drop one onto the panel or paste a screenshot, and the negative appears beside the original. Each of the red, green and blue values is replaced by 255 minus itself and the alpha channel is copied across untouched, which is what keeps a transparent PNG transparent rather than handing back a solid black or white block. The work happens in this browser tab, so nothing is uploaded and there is no account, the plain RGB arithmetic is reversible on the same decoded pixels. Downloaded files can change through JPEG encoding or canvas transparency rounding.
no image yet
the negative appears here
· drop one here · or paste a screenshot
- Grayscale first
- Save as
- Size
- no image yet
Those three lines are printed by running the same code your picture goes through, not typed in by hand.
Common questions
- How do I invert the colours of an image?
- Press Choose image, drop a file anywhere on the dark stage, or paste a screenshot from the clipboard. The picture is decoded in this tab, drawn onto a canvas, read back as pixels and inverted straight away: the negative sits in the pane next to the original, on a checkerboard so you can see any transparency. Download saves it with your own file name and -inverted on the end, as a PNG or a JPEG. There is no upload step, no queue and no Convert button to wait on.
- Does inverting keep a transparent background?
- Yes, when you save as PNG. Every pixel carries four numbers, red, green, blue and alpha, and only the first three are inverted here. The alpha is copied straight across, so a pixel that was fully transparent is still fully transparent afterwards and a half-transparent edge keeps exactly the same alpha value. A tool that inverts all four numbers turns a clear background into a solid block instead, which is the usual reason a transparent PNG comes back looking wrong. JPEG has no transparency at all, so if you choose it the page tells you before the download that those pixels will be filled with white, rather than letting you find out in the file.
- Can I invert only the brightness and not the colours?
- Set Grayscale first to Yes. Each pixel is flattened to a single brightness value using the Rec. 709 luminance weights, 0.2126 for red, 0.7152 for green and 0.0722 for blue, and that grey value is the one inverted. A pure red pixel comes out at 201 in all three channels, because red 255 gives a luminance of 54.213, which rounds to 54, and 255 take 54 is 201. The result is a black and white negative, the way a film negative of a monochrome print looks. This is the one setting that throws information away, so a second pass with it on will not bring your colours back.
- Will inverting twice give me the original back?
- In the arithmetic, exactly. Subtracting a whole number from 255 twice returns the number you started with, with no rounding anywhere in between, so a second pass over the same pixels gives byte for byte what went in. Three practical caveats when you do it through files rather than in one sitting. Grayscale first is not reversible, because the colour is gone after the first pass. A JPEG is re-encoded every time it is saved, so a round trip through JPEG comes back close but not identical: save as PNG if you want to check the claim. And a partly transparent pixel can shift by a value or two, because a browser canvas stores colour multiplied by its alpha and has to divide that back out when the page reads the pixels.
- Is my image uploaded?
- No. The file is read by the page itself, decoded by your browser, drawn onto a canvas and inverted in memory; there is no server in this and no endpoint for an image to go to. Nothing about the picture is sent to analytics either, and nothing about it is written to your browser's storage: the tool remembers your grayscale and format choices between visits, and that is all it remembers.
- How large an image can it handle?
- Up to 25 megapixels in one pass, which is about 6,000 by 4,000 pixels, the full frame of a 24 megapixel camera. There is no limit on how many bytes the file is. Past 25 megapixels the tool says the size it read, says the cap and asks you to scale the picture down first, instead of locking up the tab trying. One more thing worth knowing: an animated GIF is inverted as the single frame the browser decodes, not as an animation.
On the same decoded pixels with grayscale off, applying 255 minus each RGB value twice restores those RGB values, with alpha unchanged. Downloaded files may differ because of JPEG encoding and canvas transparency rounding. Grayscale uses the Rec. 709 luminance weights and is not reversible.