Remove alpha channel in an image

前端 未结 13 1177
青春惊慌失措
青春惊慌失措 2020-12-12 15:10

I have an app icon for iOS but Apple doesn\'t allow alpha to be in the image. How to remove this alpha channel? I only have the png image with me I don\'t have the source fi

相关标签:
13条回答
  • 2020-12-12 16:01

    Having run into the same problem in the context of Flutter applications, I have dedicated a simple website for this task where you can remove alpha channels of images:

    Remove Alpha Channel

    Basically I run ImageMagick using Web Assembly directly in the browser, so none of your images are uploaded and you don't need any other tools like Gimp.

    0 讨论(0)
  • 2020-12-12 16:02

    Well, since you're on a Mac, next time you probably just want to use Automator. Convert the image to BMP (lossless) and back to PNG. Let it save and voila...

    0 讨论(0)
  • 2020-12-12 16:06

    The accepted answer to export to JPG, then back to PNG is not recommended.

    • It's an extra step in the process (2 exports)
    • JPG is lossy, so you will lose some image data

    Here's a super fast and easy way to do this without the extra export or saving to (lossy) JPG:

    Using Preview app (Mac):

    1. Open the image
    2. Command-Shift-S to Duplicate (creates a copy)
    3. Command-S to Save
    4. Deselect the "Alpha" checkbox
    5. Delete " copy" from filename (including the space)
      • This will overwrite your original, if you want to keep the original, just leave "copy" in the name
    6. Save
    7. Click 'Replace' to confirm you want to overwrite the original
      • Only necessary if you are overwriting your original
    0 讨论(0)
  • 2020-12-12 16:07

    There's no need to export the image to jpg first. You can uncheck the checkbox for the alpha channel and export directly from a png to a png without alpha channel in the preview app.

    0 讨论(0)
  • 2020-12-12 16:08

    the alpha check box is no longer there in preview

    0 讨论(0)
  • 2020-12-12 16:09

    If you are using the Preview app, there's no need to export then re-export between jpg and png, just choose export and below the filetype (PNG) you will see an alpha checkbox, unset it and save.

    0 讨论(0)
提交回复
热议问题