简体   繁体   English

在不丢失透明度的情况下减小 a.png 图像的大小

[英]Reduce size of a .png image without losing transparency

Basically, I'd like to resize or resample a.png image (in order to reduce its file size) and yet retain it's transparency.基本上,我想调整大小或重新采样 a.png 图像(以减小其文件大小)并保持其透明度。

Anybody got an idea how best to go about this?有人知道如何最好地解决这个问题吗?

Thanks.谢谢。

You can use paint.net , it is a free tool.您可以使用paint.net ,它是一个免费工具。 Although it is pretty basic, it does the job.虽然它非常基本,但它可以完成工作。

Go to Image > Resize转到图像>调整大小

Stumbled upon this thread and found the following site that does exactly what is requested: https://onlinepngtools.com/resize-png偶然发现这个线程并发现以下站点完全符合要求: https ://onlinepngtools.com/resize-png

What graphics program are you using?你用的是什么图形程序?

Photoshop does this by simply going thru IMAGE > IMAGE SIZE and resizing. Photoshop 只需通过“图像”>“图像大小”并调整大小即可完成此操作。 Transparency is not affected.透明度不受影响。 I'm sure Paint Shop Pro does the same我确定 Paint Shop Pro 也会这样做

I know this is an old question, but the answer that worked for me was to use Inkscape.我知道这是一个老问题,但对我有用的答案是使用 Inkscape。

  1. Start Inkscape (free on Inkscape.org).启动 Inkscape(在 Inkscape.org 上免费)。
  2. File -> Import... (Ctrl+I) the PNG file you want to resize (defaults on import dialog are ok).文件 -> 导入... (Ctrl+I) 您要调整大小的 PNG 文件(导入对话框中的默认值可以)。
  3. With the image you just imported selected, select File -> Export PNG image... (Shift+Ctrl+E)选择刚刚导入的图像,选择文件 -> 导出 PNG 图像... (Shift+Ctrl+E)
  4. In the Export PNG Image tool pane, click the Export As... button to set the output filename and location.在“导出 PNG 图像”工具窗格中,单击“导出为...”按钮以设置输出文件名和位置。
  5. In this same tool pane, set the image size using width/height or pixels.在同一工具窗格中,使用宽度/高度或像素设置图像大小。
  6. In this same tool pane, click the Export button to create the output file.在同一工具窗格中,单击“导出”按钮以创建输出文件。

This worked for me, hope it helps someone else.这对我有用,希望它能帮助别人。

Providing the image you have created / have been working on is transparent in the first place, using the "Resize" or "Resample" tools in any major image editing package (eg PhotoShop, PaintShop Pro and so on) should not affect (or lose) the transparency at all.假设您创建/一直在处理的图像首先是透明的,使用任何主要图像编辑包(例如 PhotoShop、PaintShop Pro 等)中的“调整大小”或“重新采样”工具应该不会影响(或丢失) ) 透明度。

I use PaintShop Pro (X6, 64 Bit) myself and typically find that the "PNG Optimizer" option offers more options along these lines (than the default "Save As >.png" route).我自己使用 PaintShop Pro(X6,64 位),通常会发现“PNG 优化器”选项提供了更多选项(比默认的“另存为 >.png”路径)。

Hope that this helps (specific to PaintShop Pro Users) in relation to the source question.希望这对源问题有帮助(特定于 PaintShop Pro 用户)。

While I was waiting for the downloads of other image editing softwares, I tried Microsoft Power Point and succeeded in preserving the transparency.在等待下载其他图像编辑软件的过程中,我尝试了 Microsoft Power Point,并成功地保持了透明度。 Drag the image inside any slide, crop or resize, then save as a new picture as.png.将图像拖动到任何幻灯片中,裁剪或调整大小,然后将新图片另存为 .png。 You can drag the image back in ppt to confirm the transparency is maintained您可以将图像拖回到ppt中以确认保持透明度

The complete Autodesk Sketchbook is now out for free including all the previous premium features such as resizing an image.完整的 Autodesk Sketchbook 现在免费提供,包括所有以前的高级功能,例如调整图像大小。

You do it as you would in paint by clicking on Image > Image Size... and then you can save as a.png without losing transparency.您可以像在绘画中一样通过单击“图像”>“图像大小...”来执行此操作,然后您可以将其另存为 a.png 而不会丢失透明度。

Image size can be reduced by reducing number of colors and there are online tools to do this.可以通过减少颜色数量来减小图像大小,并且有在线工具可以做到这一点。

Try these..Hope they solve your problem试试这些..希望他们能解决你的问题

https://tinypng.com/ https://tinypng.com/

http://pngcrush.com/ and http://pngcrush.com/

http://tools.dynamicdrive.com/imageoptimizer/ --It provides more output images with different number of colors. http://tools.dynamicdrive.com/imageoptimizer/ --它提供更多具有不同颜色数量的输出图像。 However, smoothness will be effected, take care.但是,会影响光滑度,小心。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM