Short answer: Image dimensions tell you how many pixels an image has; file size tells you how many bytes its encoded representation uses. JPEG is lossy and opaque, PNG is lossless and can preserve alpha, and WebP can support lossy or lossless pixels, alpha, and animation. No extension is always smallest. Pick the properties the destination needs, encode a candidate, measure its bytes, inspect its pixels, and keep the original.
Separate width, pixel count, and file size
An image can be described in several kinds of “size,” and confusing them leads to unreliable optimization. Width and height are dimensions, such as 2400 × 1600 pixels. Their product is 3,840,000 pixels, or 3.84 megapixels. File size is the length of the encoded file, such as 620 KiB. A print label such as 300 dpi describes a relationship between pixels and physical units; it does not create more pixels.
| Measurement | Example | What it controls | What it does not prove |
|---|---|---|---|
| Dimensions | 2400 × 1600 px | Pixel grid and aspect ratio. | The encoded byte count or visual quality. |
| Pixel count | 3.84 MP | How many pixel positions must be represented. | How complex or compressible their colors are. |
| File size | 620 KiB | Storage and transfer bytes. | The dimensions without reading the format. |
| Resolution metadata | 300 dpi | An intended physical print scale in compatible software. | Additional detail beyond the existing pixel grid. |
Two 1200 × 800 photographs can differ greatly in bytes. A smooth studio backdrop compresses differently from foliage, fabric, noise, or confetti because an encoder must describe more high-frequency variation. A tiny compressed file can still decode to a large in-memory canvas: RGBA pixel storage commonly starts around four bytes per pixel before browser and intermediate-buffer overhead.
Lossless and lossy describe the encoding step
A lossless encoder can reconstruct the exact pixel values it received. PNG uses lossless compression: decoding its output recovers those encoded pixels and alpha values. That promise begins at the encoder input. If those pixels came from a blurry resize or a lossy WebP, PNG preserves the blur or artifacts exactly; it cannot recover the original scene or a prior master file.
A lossy encoder represents the image approximately to save bytes. JPEG discards information according to its encoder and quality input. WebP can use lossy or lossless coding, although a browser Canvas WebP export commonly exposes a quality argument for its produced output. Repeated lossy conversion can cause generation loss because the next encoder works from already approximated pixels.
“No quality loss” needs a reference point. Lossless PNG can preserve decoded pixels, but a format conversion may still discard animation, metadata, color-management information, or the original compressed representation. Always say which property is preserved.
JPEG, PNG, and WebP comparison
| Format | Pixel compression | Transparency | Animation | Common fit | Main caveat |
|---|---|---|---|---|---|
| JPEG | Lossy | No alpha channel | No | Opaque photographs and broad legacy compatibility | Hard edges and text can show ringing or block artifacts. |
| PNG | Lossless | Yes | APNG exists, but not in these static tools | Logos, diagrams, screenshots, and transparent graphics | Full-resolution photographs can be much larger. |
| WebP | Lossy or lossless at the format level | Yes | Yes at the format level | Modern web delivery across varied image content | Tool and downstream support must match the particular features used. |
The format capability is not the same as a particular utility's contract. LiveParse's image tools accept validated static JPEG, PNG, or WebP where stated and reject animated input. They do not currently accept HEIC or AVIF. A converter that outputs PNG creates one static PNG, not an APNG; a converter that outputs JPEG cannot keep alpha or animation.
A quality setting is not a universal percentage
A value such as 0.8 is an instruction to a particular encoder implementation. It is not “80% of the original quality,” does not mean 20% of bytes were removed, and does not map identically across JPEG and WebP encoders or browsers. Content also matters: the same value can produce different sizes and artifact patterns for two images with identical dimensions.
PNG through the browser Canvas export path does not expose an equivalent lossy quality control. Re-encoding a PNG may change its byte size because implementations and ancillary chunks differ, but passing a decorative quality value is not a sound PNG compression method. To reduce a difficult PNG substantially, consider smaller dimensions or a different format after checking whether losslessness and alpha are required.
How a target file-size workflow should work
A target such as 200 KB should be treated as a maximum byte budget, not a label written into the file. LiveParse's compressor defines 1 KB as 1,024 bytes and offers 20 KB, 50 KB, 100 KB, 200 KB, 500 KB, and 1 MB presets. A candidate must be encoded before its real length can be measured.
- Validate and decode the source. Confirm a supported static format and obtain actual dimensions.
- Choose a destination format. Decide whether alpha, losslessness, or JPEG compatibility is required before optimizing.
- Encode and measure. For JPEG or WebP, try quality candidates and retain the highest-quality result found at or below the byte ceiling.
- Reduce dimensions when needed. If quality alone cannot meet the target, shrink width and height proportionally and repeat. Fewer pixels often change size more decisively.
- Respect format limits. PNG has no comparable lossy quality search in this path, so a difficult target may require proportional resizing or another format.
- Report failure honestly. Encoder results are discrete, minimum dimensions and quality safeguards matter, and a very small target may not be reachable.
- Inspect the actual output. Check bytes, dimensions, transparency or matte, and artifacts at useful zoom—not just a slider value.
If Original format is selected and the original file already fits the compressor's target, returning those source bytes unchanged avoids a needless encoding generation. If conversion or resizing occurs, the output is newly encoded even when its format name matches the source. Exact target equality is uncommon and unnecessary when the real requirement is “at or below.”
Resize geometry: exact pixels, percent, contain, and cover
Resize only to dimensions the destination can display or store usefully. Scaling a 4000-pixel photograph down for an 800-pixel content slot removes data the viewer cannot see at that presentation size and usually reduces transfer cost. Upscaling does the opposite: it interpolates additional pixels but cannot restore texture, focus, or legibility absent from the source.
| Mode | Rule | Example for a 3:2 source and 1200 × 1200 box |
|---|---|---|
| Exact independent dimensions | Force width and height separately. | 1200 × 1200, but the image stretches unless the ratio already matches. |
| Percent with aspect lock | Scale both axes by the same factor. | 50% turns 2400 × 1600 into 1200 × 800. |
| Contain | Fit the entire image inside the box. | 1200 × 800; no crop, with unused box height. |
| Cover | Fill the box and crop overflow. | 1200 × 1200; source content is cropped horizontally. |
| No-upscale | Cap scale at the source dimensions. | A 640 × 480 source stays 640 × 480 in the larger box. |
Cover crops should be inspected for subjects near edges. A centered crop cannot know which face, label, or object is semantically important. Aspect lock avoids distortion; no-upscale avoids producing larger interpolated output when the destination can accept a smaller image.
Transparency requires either alpha or a deliberate matte
PNG and WebP can represent an alpha value per pixel. Alpha enables transparent holes, soft shadows, and blended edges. JPEG is opaque. When converting PNG or WebP to JPEG, first fill the output canvas with a chosen color, then composite the source over it. That color becomes permanently mixed into partially transparent edge pixels.
Choose a matte that matches the final background. A white matte around an icon can create a pale fringe on a dark page. If the asset will appear on multiple backgrounds, keep a transparent PNG or WebP master. Converting static WebP to PNG can preserve decoded alpha without flattening, but the PNG may be much larger and will not preserve WebP container metadata.
Animation, metadata, orientation, and resolution are separate properties
A browser may visually decode an animated source, but a static Canvas export does not preserve frame duration, looping, frame disposal, or the sequence. Silently saving the first decoded frame is risky: that frame may be partial or simply not the still the user intended. The LiveParse image tools reject animated PNG and WebP and require a frame-aware workflow for deliberate extraction.
Canvas conversion generally creates a new file from decoded pixels rather than copying EXIF, IPTC, XMP, embedded previews, or original profile and resolution chunks. Orientation is applied according to browser decoding behavior and the displayed output should be checked. Canvas exports typically use 96 dpi where a format supports resolution metadata, but pixel dimensions—not that label—remain authoritative for screens.
Do not use format conversion as a guaranteed metadata sanitizer. If metadata carries attribution, accessibility, color, legal, medical, location, or privacy consequences, archive the original and inspect or rewrite the output with a dedicated metadata-aware application.
Validate bytes, not only names
A filename extension and a declared MIME type are helpful hints, but both can be missing or wrong. A robust local tool checks format signatures: PNG has a defined leading signature, JPEG begins with its marker sequence, and WebP uses a RIFF container with a WEBP form identifier. Signature validation does not make arbitrary data safe or guarantee successful decoding, but it prevents treating a renamed unrelated file as a supported image.
Resource limits matter after identity. The LiveParse image tools cap inputs at 25 MiB and decoded dimensions at 40 megapixels. They reject HEIC, AVIF, animated inputs, unsupported signatures, and files the browser cannot decode. When a requested JPEG, PNG, or WebP encoder returns a blob with a different MIME type, the operation fails instead of downloading mislabeled fallback data.
What local browser processing does and does not mean
For these tools, the selected image is read with browser file APIs, decoded, transformed, previewed, and exported in the current tab without intentionally posting its bytes to an image-processing endpoint. This reduces one common disclosure route and can keep the workflow responsive after page assets have loaded.
That boundary is narrower than “nothing ever leaves the device.” Opening the page involves ordinary website requests. Browser extensions, endpoint-security products, clipboard or accessibility utilities, cloud-synced source and download folders, operating-system backups, and any service where the result is later shared have their own behavior. For highly sensitive images, use a controlled device and network, understand installed software, and verify the final file separately.
A practical format and optimization decision tree
- Keep the original master. Never make a one-way conversion the only copy.
- Check animation first. Use an animation-aware workflow if timing or multiple frames matter.
- Decide whether transparency is required. Choose PNG or supported WebP for alpha; choose a deliberate matte for JPEG.
- Match dimensions to the destination. Prefer aspect-safe downscaling; avoid upscaling unless larger interpolated pixels are truly required.
- Choose by content. Start with JPEG or WebP for opaque photos and PNG for lossless graphics, screenshots, or editable alpha, then test.
- Encode, measure, and preview. Compare actual bytes and visible artifacts across relevant formats or quality values.
- Verify non-pixel requirements. Check metadata, orientation, color, physical print scale, filenames, and downstream acceptance separately.
- Document the result. Record the chosen dimensions, format, target ceiling, and why the trade-off was acceptable.
Choose the LiveParse image operation that matches the requirement
| Requirement | Tool | Primary decision |
|---|---|---|
| Meet a maximum byte budget | Image Compressor | Target bytes, output format, quality, and possible proportional downscaling. |
| Change width, height, percentage, or fit | Image Resizer | Pixels versus percent, contain versus cover, aspect lock, and no-upscale. |
| Make an opaque JPEG from PNG | PNG to JPG Converter | The background that permanently replaces PNG transparency. |
| Make an opaque JPEG from static WebP | WebP to JPG Converter | Alpha matte, animation rejection, and possible second-generation loss. |
| Keep static WebP alpha in PNG | WebP to PNG Converter | Decoded transparency versus a potentially much larger lossless file. |
Pre-download image checklist
- Source identity: Do signature bytes and decoded dimensions match the file you intended?
- Static or animated: Are you preserving a still image, or does the source require frame-aware handling?
- Dimensions: Does the destination need every source pixel, and is the aspect ratio correct?
- Format: Does the output need alpha, lossless decoded pixels, or JPEG compatibility?
- Matte: If output is JPEG, is the chosen background correct for all transparent edges?
- Artifacts: Have you inspected text, faces, edges, gradients, and texture at meaningful zoom?
- Bytes: Is the measured file at or below the real limit, rather than merely near a slider guess?
- Metadata: Have required orientation, profile, attribution, privacy, and print records been checked separately?
- Output identity: Did the browser actually produce the requested MIME type?
- Original retained: Can you return to the unflattened, unresized, or animated master later?
Start with the requirement you can measure. Use the compressor for a byte ceiling, the resizer for geometry, or a format converter when a specific destination format is mandatory.
Open the Image CompressorFrequently asked questions
What determines an image's file size?
Pixel dimensions, color and alpha data, image complexity, format, encoder settings, metadata, and prior processing all affect byte size. Dimensions set the amount of pixel data, but two images with the same width and height can still compress to very different sizes.
Is lossless compression the same as no quality loss from the original scene?
No. Lossless means the encoded file can reconstruct the pixel values supplied to that encoder. If a source was already resized, edited, or encoded lossily, saving those decoded pixels as PNG cannot restore detail that was previously discarded.
Can an image compressor guarantee an exact target size?
Usually not. Encoders produce discrete byte results, and browser implementations differ. A responsible workflow encodes and measures candidates, keeps the highest acceptable quality at or below a maximum when possible, and reports when safeguards prevent meeting the target.
Which format should I use for transparency?
Use PNG or a supported WebP output when decoded alpha must remain. JPEG cannot store transparency, so conversion to JPEG requires compositing transparent pixels over a chosen background and permanently baking that matte into edge pixels.
Does converting an image preserve animation and metadata?
Do not assume it does. A static Canvas workflow cannot preserve a timed animation, and it generally does not copy source EXIF, IPTC, XMP, color-profile, or resolution records. Keep the original and use specialized tools when those properties matter.
Do LiveParse image tools upload the selected image?
The listed image tools read, decode, process, preview, and export the selected file in the current browser tab without intentionally sending its image bytes to an image-processing service. Page requests, extensions, operating-system services, synced folders, and later sharing remain separate privacy boundaries.