Notes › Tech Notes › The Page Lists Six Input Formats but Offers Only 3 Output Buttons: The Byte Budget of One 480x320 Image

The Page Lists Six Input Formats but Offers Only 3 Output Buttons: The Byte Budget of One 480x320 Image

The upload tip lists six input formats while only three output buttons exist, and all 18 conversions match their format headers. One 480x320 image costs 203042 bytes across PNG, WebP and JPG, same-format converts re-encode instead of passing through, and oversized canvases fail silently.

The Page Lists Six Input Formats but Has Only 3 Output Buttons

The upload tip lists PNG / JPG / WebP / BMP / GIF / SVG, yet further down there are only three output buttons to choose from. The natural first guess is that some formats on the list are decoration, so one real sample was made for each and fed in: all 6 register, none is skipped, and not a single one is stopped by the "non-image file skipped" gate. Then 6 inputs times 3 outputs gives 18 conversions; check each product's file header and it matches the chosen output format, with 18 successes and 0 fallbacks. The list and the exits on this page are complete - what is missing is only an imagined "fourth exit".

All samples are self-made: one 480×320 gradient PNG, the same pattern encoded as JPG and as WebP, one uncompressed BMP, one 4×4 GIF, plus one SVG that carries width and height attributes. Every action was clicked on the image format conversion page; the only thing you can change is the output button, and the parameters follow that button.

One 480×320 Image: How Many Bytes at Each Output

Feeding the same 480×320 image into the three outputs: PNG gives 7077 B, WebP gives 83806 B, JPG gives 112159 B - the minimum lands on PNG, the maximum on JPG, and the three formats together cost 203042 B for one image. Then swap the source container: the same pixels packed into a 460854 B uncompressed BMP file, run through the three outputs, produce byte-for-byte identical products to the ones above. The output size only looks at pixels; it does not care which container the upload came in.

Output bytes for one 480×320 image PNG output 7077 B WebP output 83806 B JPG output 112159 B Total 203042 B (7077 / 83806 / 112159)

Figure 1: product bytes of one 480×320 image at the three outputs; bar length is scaled against 112159 B as the full width.

Those three rows only describe how the same pixels distribute across outputs; they say nothing about appearance. The visual gap of lossy outputs was not measured here, so no claim is made about which looks better. If the goal is squeezing a PNG further down, that is a different input once the format is already fixed, handled on the PNG compression page.

Same-Format Conversion Is Not a Pass-Through

The easiest thing to misread is converting a file into the format it already has: png to png, jpg to jpg looks like nothing changes, as if the file were handed back untouched. The measurement says otherwise. A 249214 B PNG through the PNG output comes out at 7077 B; a 112159 B JPG through the JPG output comes out at 105694 B, 6465 B smaller; an 83806 B WebP through the WebP output comes out at 80466 B, 3340 B smaller. Every output value is a fresh byte count after re-encoding, and none of them is the source file's length.

The code path backs this up: each conversion decodes to width and height, builds a new canvas, repaints the whole frame, and hands it to the encoding interface. There is no branch that passes the source blob straight through when the formats match. And because it only repaints without touching dimensions, the output width and height always equal the decoded values.

Same-format converts: input vs output bytes png input 249214 B png output 7077 B jpg input 112159 B jpg output 105694 B webp input 83806 B webp output 80466 B

Figure 2: input and output bytes of the three same-format pairs; light bars are the input length at registration, dark bars are the output product length.

Batch Totals and the Summary Bar

Rerunning the single-image ledger as a batch: 6 files totalling 885.1 KB through the three outputs produce 648.0 KB, 430.3 KB and 336.3 KB, and the summary bar reports size reductions of 27%, 51% and 62%. A mixed batch of 8 files at 1.32 MB through WebP yields 665.7 KB; removing one file from the list recomputes the totals on the spot to 1.09 MB → 583.9 KB, a 48% reduction - the summary bar follows the live list instead of locking onto the first batch.

Batch scopeInput totalOutput productsSummary bar text
6 files via PNG885.1 KB648.0 KBreduced 27%
6 files via JPG885.1 KB430.3 KBreduced 51%
6 files via WebP885.1 KB336.3 KBreduced 62%
8 files via WebP1.32 MB665.7 KBreduced 51%
recount after removing one1.09 MB583.9 KBreduced 48%
one file in a batch fails243.4 KB109.5 KBconverted 1 / 2 files, reduced 55%

The last row is the one worth remembering from this batch: the total only accumulates finished items, while the denominator still uses the list length - two rules written into the same string.

Two Gates for Bad Input, and the Canvas Side Length

Abnormal inputs hit two gates. The first one is before registration: a 0 B empty file, a 33 B plain-text file renamed to .png, and a JPEG truncated to 460 B all stop at the same prompt, "cannot read image:" followed by the file name; they never reach the list, and there is no lenient mode that still emits half a picture. The second gate fires at encoding time: an SVG with a single side of 70000 px registers normally, fails only when the canvas is built, and reports "conversion failed", while the other file in the same batch ships as usual and the summary reads "converted 1 / 2 files".

The canvas side length was measured at both ends of the limit: 65535×1 encodes normally and its data URL runs 1754 characters; for 65536×1 and 1×65536 the width and height attributes still read back as 65536, yet the encoded result is only 6 characters; handing a 70000×8 canvas to the native encoding interface calls back null outright - past the limit the canvas dies silently, and the page relies on that null to report the failure. The area-side ceiling could not be reproduced with a trustworthy sample on this machine, so it stays unmeasured and gets no number here; containers outside the list and animation frames were likewise not tested.

The Parameter Row Follows the Output

When you switch outputs, the controls are not all parked in one static row: the quality row disappears entirely under a PNG target and only shows for JPG and WebP; the keep-transparency checkbox is disabled under both PNG and JPG, the background-colour picker is movable only under JPG, and the checkbox is genuinely clickable at exactly one output - WebP. In other words, anything on the page that looks adjustable first has to be checked for whether it is alive under the current output. How transparency is handled once it enters each output, and how the quality levels take part in encoding, are covered by a separate site article, transparent areas forced onto a background colour when converting to JPG; this piece only reports which controls are present and does not repeat those conclusions.

Convert the Same Batch Twice, the Counter Does Not Reset

Clicking convert again on the same batch gives 8 products whose byte counts match the first run item by item - there is no randomness in the encoding; old products are replaced by new ones with neither merging nor skipping. There is also a piece of leftover state: after clearing the list and loading 8 files again, the numbering continues from the previous batch, running from 9 to 16 instead of resetting - the list is cleared but the counter is not. It does not affect the products themselves, only the moment you match a file to its number in the download folder.

A Few Questions You Cannot Skip

Q: For inputs like GIF or SVG, do the output dimensions change?

No. The page carries no size parameter at all, and the output width and height always equal the decoded values: the 480×320 sample still comes out 480×320, the 4×4 GIF is still 4×4, and the 256×256 SVG is still 256×256. Resizing needs a different tool page.

Q: If one file in a batch fails, can the others still get products?

Yes. The single-side 70000 px file fails at encoding time, the other file in the same batch ships as usual, and the summary bar writes both sides into "converted 1 / 2 files" - only the total counts the finished file.

Q: Can several files be packed into one archive for download, and how big is it?

Only the branch was verified: when there is 1 product the download takes the single-file path, and with several files it takes the packing path, where the packing library is genuinely present. In local experiments the download never lands on disk, so the archive's byte count was never measured and no number is given here.

📎 Related articles

One Invalid Snippet Turns 100 Rows Into 0: Cell Values and the Row Ledger When JSON Becomes a Table 2026-11-24 Splitting And Merging 20 Samples Back: Only 11 Restore The Original Byte For Byte 2026-11-24 24 whitespace code points survive even with every box checked: a per-code-point truth table for text trimming 2026-11-23 Paste 133 Characters, Copy Out 149: Six Rewrites of Value Text in the JSON View 2026-11-23 A malformed URL into the parser page: example.com:80 is read as the protocol, and %e stops the segment table halfway 2026-11-21