基於瀏覽器的免費圖像轉換
JPG 到 PNG 轉換器
ImageConver 透過解碼 JPEG 並將像素寫入 image/png,在瀏覽器中將 JPG 或 JPEG 轉換為 PNG。 PNG 避免了轉換後的柵格的另一個有損編碼步驟,但它無法恢復已丟棄的 JPEG 細節或重新建立原始檔案原始透明度。對於照片來說 PNG 可以更大。可選的顏色鍵透明度工作流程使用容差值,該值可能會影響附近的前景色。您的圖像內容保留在瀏覽器中並且不會上傳。
免費瀏覽器工具
轉換並檢查 PNG 輸出
選擇一張圖像,選擇相關設置,並在下載前比較結果。圖像內容保留在此瀏覽器工作流程中。
一目了然
JPG 到 PNG 轉換的快速事實
- 輸入 MIME
- 影像/jpeg。
- 輸入擴充
- .jpg 和 .jpeg;兩者都是 JPEG 媒體類型的常見檔名結尾。
- 輸入壓縮
- JPEG 通常是有損的,因此解碼的像素可能已經包含壓縮偽影。
- 輸出 MIME
- 圖片/png。
- PNG壓縮
- PNG 在其接收的像素格式規格中是無損的,但這不能恢復來源 JPEG 中遺失的細節。
- 透明度
- 正常的 JPG 到 PNG 轉換不會重新建立原始透明度。可選的色鍵刪除可以使用容差使選取的像素透明。
- 卡通
- JPG 和 PNG 在此工作流程中是單圖像格式;沒有要保留的動畫。
工作流程
如何將 JPG 轉換為 PNG
- 1
選擇 JPG 或 JPEG
選擇來源照片、掃描件、螢幕截圖或圖形。瀏覽器對 JPEG 像素進行解碼;這不會暴露原始的壓縮前資料。
- 2
選擇透明行為
保留像素不透明以實現忠實的畫布匯出,或僅在已知背景顏色應變為透明時啟用可選的顏色鍵工作流程。
- 3
Set tolerance carefully
A small tolerance selects colors close to the key color. Increase it only while checking edges, because nearby foreground pixels can also be cleared.
- 4
檢查並下載
Compare the PNG against the JPG at full size, check the alpha edge if used, and confirm that the larger PNG fits the target editor or upload limit.
Controls
JPG to PNG settings explained
- PNG輸出
- Canvas toBlob accepts an output MIME and a quality argument for lossy image types. This request uses image/png, so the PNG encoding does not add another JPEG-style quality loss, but it records the pixels that the browser decoded from the JPG.
- Color-key transparency
- When enabled, pixels near a chosen key color can have their alpha cleared. This is useful for simple solid backgrounds, not for complex photographic separation.
- Tolerance
- Tolerance is a color-distance threshold. A higher value affects a wider range of nearby colors and can remove similar foreground shades along with the background.
- Output filename
- The download uses a PNG extension so applications can identify the new MIME type. It does not imply that original JPEG metadata or detail has been restored.
Output behavior
What JPG to PNG can and cannot change
Another lossy step is avoided
將解碼後的像素寫入 PNG 避免了另一個 JPEG 編碼步驟。當 PNG 將接受更多編輯、文字覆蓋或重複儲存時,這會有所幫助,但它無法恢復來源 JPEG 已遺失的細節。
無法恢復原來的透明度
JPG 沒有 Alpha 通道。轉換器無法知道哪些背景像素曾經是透明的。可選的顏色鍵刪除是基於所選顏色和容差的推斷,而不是恢復原始透明度。
照片尺寸常變大
對於照片來說,PNG 可能比 JPG 大,因為 PNG 保留每個接收到的像素,而不會進行 JPEG 量化。在許多照片情況下,需要較大的文件,這本身並不是轉換錯誤。
容差可以改變前景色
Color-key transparency compares pixel colors to a key color. Anti-aliased edges and similarly colored objects can be affected when tolerance is too high, so inspect the result against a contrasting background.
決策指南
當 JPG 轉 PNG 值得做時
當下一個工具需要 PNG 輸入時,當您需要避免另一個有損 JPEG 保存時,或者當您將添加疊加層並希望為新像素提供支援 alpha 的輸出畫布時,請轉換為 PNG。当您想要解码图像而不去除未经验证的背景时,请从默认的不透明导出开始。
Do not convert expecting sharper original detail or recovered transparency. Keep the JPG for compact photo delivery, and use the color-key option only for a simple, known background where you can review edge effects. For photographs, compare file sizes before committing to PNG storage.
比較
Opaque export versus color-key transparency
| Mode | Keeps | Useful For | Watch For |
|---|---|---|---|
| Opaque PNG | All decoded pixels as visible pixels | Photo archives, editors, and predictable visual comparison | No alpha is invented; the file can be larger than the JPG |
| Color-key PNG | Pixels outside the selected color range | Simple flat backgrounds and basic cutout preparation | Tolerance can remove similar foreground colors and create edge artifacts |
| Keep JPG | The original compressed delivery file | Compact photo publishing and systems that require JPEG | 進一步的 JPEG 保存可能會添加更多有損偽影 |
解決問題
JPG 到 PNG 輸出故障排除
PNG 看起來並不比 JPG 更清晰
可能的原因: PNG 無法恢復 JPEG 壓縮已丟棄的細節。
怎麼辦: 當細節很重要時,請使用原始相機或來源匯出。將 JPG 轉換為 PNG 視為格式更改,而不是增強步驟。
PNG更大
可能的原因: PNG 保留解碼後的像素,對於照片來說通常不太緊湊。
怎麼辦: 保留 JPG 以實現緊湊的照片傳輸,或在儲存之前將 PNG 大小與編輯或上傳要求進行比較。
結果不透明
可能的原因: 正常的轉換不知道哪些 JPG 像素應該有 Alpha。
怎麼辦: Use a color-key workflow only for a known background, then verify the alpha edge. Original transparency cannot be reconstructed from an ordinary JPG.
Foreground colors disappeared
可能的原因: The selected color-key tolerance covered colors similar to the background.
怎麼辦: Lower tolerance, choose a more representative key color, or leave the export opaque and remove the background with a dedicated editing workflow.
隱私
Browser-local JPG processing
The source image stays in your browser while the JPEG is decoded and converted with canvas APIs. The page may load its own scripts and normal site assets, but this workflow does not upload image contents to a conversion server.
本地處理不保證輸出不包含識別資訊:來源像素可能顯示人物或地點,畫布輸出可以省略或更改元資料。在發布之前查看視覺文件和您的共享上下文。
- 來源處理
- 在解碼、色鍵處理和 PNG 編碼期間,圖像內容保留在瀏覽器中。
- 元資料處理
- 不要依賴透過畫布輸出保留來源 JPEG 元資料。
常見問題
JPG 轉 PNG 問題
JPG 轉 PNG 能否恢復失去的細節?
不會。 PNG 避免了另一個有損編碼步驟,但它無法恢復已被丟棄的 JPEG 細節。
轉換器能否恢復原來的透明度?
不可以。 JPG 沒有 Alpha 通道。颜色键选项可以从选定的颜色和容差推断透明度,但它无法知道原始蒙版。
為什麼 PNG 比 JPG 大?
PNG 对于照片来说可能更大,因为它保留了解码的像素值而无需 JPEG 量化。這是常見的情況,不會自動失敗。
寬容有什麼作用?
容差设置像素颜色与所选关键颜色的距离有多远,但仍会被清除。較高的容差會影響相似的前景色。
我應該在照片上使用色鍵透明度嗎?
僅當背景簡單且接近已知顏色時。带纹理的背景、阴影和类似的主题颜色可能会产生明显的边缘伪影。
來源JPEG上傳了嗎?
儘管頁面可以載入自己的腳本和資源,但轉換會將圖像內容保留在瀏覽器中,並且不會上傳到轉換伺服器。
PNG 會保留我的 JPEG 元資料嗎?
不要這樣認為。 Canvas 轉換可以省略源元數據,因此在需要這些欄位時保留原始 JPEG。
參考