سؤال

ما الأداة التي يمكنني استخدامها لتحويل ملف .ICO إلى ملف .PNG؟

هل كانت مفيدة؟

المحلول

حر: @أيقونة السوشي جيد جدًا للعمل مع الرموز:

سمات

  • يمكن لـ Icon sushi تحويل ملفات الصور إلى ملفات أيقونات والعكس صحيح.
  • دعم أيقونات Windows Vista الكبيرة.(تحويل صورة كبيرة بضغط PNG)
  • دعم أيقونات نظام التشغيل Windows XP 32 بت.
  • دعم الأيقونات المتعددة التي تحتوي على بعض الرموز في الملف.
  • تحرير قناة ألفا وقناع الشفافية.
  • افتح حجم الصور من 1 × 1 إلى 256 × 256.
  • افتح الصور الملونة 1/4/8/24/32 بت.
  • يفتح:ICO/BMP/PNG/PSD/EXE/DLL/ICL، قم بالتحويل إلى:إيكو/بي إم بي/بي إن جي/ICL
  • نسخ إلى / لصق من الحافظة.

نصائح أخرى

لدى Google محول ico إلى png، لقد رأيته عليه رديت اليوم الآخر.

http://www.google.com/s2/favicons?domain=stackoverflow.com

يمكن لـ ImageMagick تحويل أي تنسيق صورة مستخدم على نطاق واسع إلى تنسيق آخر.

http://www.imagemagick.org/script/index.php

يرى http://www.imagemagick.org/script/convert.php بخاصة

توجد روابط ImageMagick لمعظم اللغات الشائعة.

لقد فعلت ذلك بهذه الطريقة في C# يقوم بالمهمة بشكل جيد

#region Usings

using System;
using System.IO;
using System.Linq;
// Next namespace requires a reference to PresentationCore
using System.Windows.Media.Imaging;

#endregion

namespace Imagetool
{
internal class Program
{
    private static void Main(string[] args)
    {
        new Ico2Png().Run(@"C:\Icons\",
                          @"C:\Icons\out\");
    }
}

public class Ico2Png
{
    public void Run(string inPath, string outPath)
    {
        if (!Directory.Exists(inPath))
        {
            throw new Exception("In Path does not exist");
        }

        if (!Directory.Exists(outPath))
        {
            Directory.CreateDirectory(outPath);
        }


        var files = Directory.GetFiles(inPath, "*.ico");
        foreach (var filepath in files.Take(10))
        {
            Stream iconStream = new FileStream(filepath, FileMode.Open);
            var decoder = new IconBitmapDecoder(
                iconStream,
                BitmapCreateOptions.PreservePixelFormat,
                BitmapCacheOption.None);

            var fileName = Path.GetFileName(filepath);

            // loop through images inside the file
            foreach (var frame in decoder.Frames)
            {
                // save file as PNG
                BitmapEncoder encoder = new PngBitmapEncoder();
                encoder.Frames.Add(frame);
                var size = frame.PixelHeight;

                // haven't tested the next lines - include them for bitdepth
                // See RenniePet's answer for details
                // var depth = frame.Thumbnail.Format.BitsPerPixel;
                // var path = outPath + fileName + size + depth +".png";

                var path = outPath + fileName + size + ".png";
                using (Stream saveStream = new FileStream(path, FileMode.Create))
                {
                    encoder.Save(saveStream);
                }
            }
        }
    }
}
}

ملحوظة:كان هذا مجانيًا عندما تم طرح هذا السؤال ولكن يبدو أنه تطبيق مدفوع على ما يبدو.يجب علىSean Kearon تغيير "الإجابة الصحيحة" الآن.

يمكنك استخدام إيكوفكس ($59)

إنه حل الكل في واحد لإنشاء الرمز والاستخراج والتحرير.إنه مصمم للعمل مع أيقونات Windows XP و Windows Vista و Macintosh التي تدعم الشفافية.

ConvertICO.com لقد عملت دائمًا بشكل جيد بالنسبة لي.

لا أعرف أين سأكون بدونها إيرفانفيو.رائع لتحويل الصور دفعة واحدة، بما في ذلك ico إلى png.

في المحطة على ماك:

convert favicon.ico favicon.png

في حال أراد أي شخص التحويل مع مكتبة تصوير بايثون (PIL) في الذاكرة من ملف أو عنوان url

from cStringIO import StringIO
import Image
import urllib

def to_png(path, mime="png"):
    if path.startswith("http:"):
        url = urllib.quote(url)
        input = StringIO()
        input.write(urllib.urlopen(url).read())
        input.seek(0)
    else:
        input = open(path).read()

    if input:
        out  = StringIO()
        image = Image.open(input)
        image.save(out, mime.upper())
        return out.getvalue()
    else:
        return None

أحد الخيارات السريعة هو التنزيل الرسام.نت وتثبيت البرنامج المساعد أيقونة / المؤشر.يمكنك بعد ذلك فتح ملفات ‎.ico باستخدام Paint.net، وتحريرها، وحفظها بتنسيق ‎.png أو تنسيق آخر.

بالنسبة لمعالجة الدفعات، أؤيد اقتراحات ImageMagick أو إيرفانفيو.

http://converticon.com/ هو أيضا مرشح.

الدفع http://iconverticons.com/ - يتيح لك iConvert تحويل Windows ico إلى Mac OS X icns بسهولة، وSVG إلى أيقونات Windows، وPNG ico إلى Mac OS X ico، وصور JPG إلى أيقونات Windows، وغير ذلك الكثير.

إليك بعض أكواد C# للقيام بذلك، استنادًا إلى إجابة "Peter" في هذا الموضوع.(إذا وجدت هذه الإجابة مفيدة، فيرجى التصويت لصالح إجابة بيتر.)

  /// <summary>
  /// Method to extract all of the images in an ICO file as a set of PNG files. The extracted 
  /// images are written to the same disk folder as the input file, with extended filenames 
  /// indicating the size of the image (16x16, 32x32, etc.) and the bit depth of the original 
  /// image (typically 32, but may be 8 or 4 for some images in old ICO files, or even in new 
  /// ICO files that are intended to be usable in very old Windows systems). But note that the 
  /// PNG files themselves always have bit depth 32 - the bit depth indication only refers to 
  /// the source image that the PNG was created from. Note also that there seems to be a bug 
  /// that makes images larger than 48 x 48 and with color depth less than 32 non-functional.
  /// 
  /// This code is very much based on the answer by "Peter" on this thread: 
  /// http://stackoverflow.com/questions/37590/how-to-convert-ico-to-png
  /// 
  /// Plus information about how to get the color depth of the "frames" in the icon found here:
  /// http://social.msdn.microsoft.com/Forums/en-US/e46a9ad8-d65e-4aad-92c0-04d57d415065/a-bug-that-renders-iconbitmapdecoder-useless
  /// </summary>
  /// <param name="iconFileName">full path and filename of the ICO file</param>
  private static void ExtractImagesFromIconFile(string iconFileName)
  {
     try
     {
        using (Stream iconStream = new FileStream(iconFileName, FileMode.Open))
        {
           IconBitmapDecoder bitmapDecoder = new IconBitmapDecoder(iconStream, 
                               BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.None);

           foreach (BitmapFrame bitmapFrame in bitmapDecoder.Frames)
           {
              int iconSize = bitmapFrame.PixelHeight;
              int bitDepth = bitmapFrame.Thumbnail.Format.BitsPerPixel;
              string pngFileName = Path.GetDirectoryName(iconFileName) + 
                                   Path.DirectorySeparatorChar +
                                   Path.GetFileNameWithoutExtension(iconFileName) + "-" +
                                   iconSize + "x" + iconSize + "-" + bitDepth + ".png";
              using (Stream saveStream = new FileStream(pngFileName, FileMode.Create))
              {
                 BitmapEncoder bitmapEncoder = new PngBitmapEncoder();
                 bitmapEncoder.Frames.Add(bitmapFrame);
                 bitmapEncoder.Save(saveStream);
              }
           }
        }
     }
     catch (Exception ex)
     {
        MessageBox.Show("Unable to extract PNGs from ICO file: " + ex.Message,
                       "ExtractImagesFromIconFile", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
  }

XnView هي أداة رسومات رائعة لنظام التشغيل Windows/Mac/Linux (مجانية) (صفحة التحميل) الذي سيتيح لك تصفح الصور، وتحويل الدفعات، والتحويل، وتغيير الحجم، والتدوير، والتقاط لقطات الشاشة وما إلى ذلك.

يمكن أن تفعل الخاص بك XYZ ل ICO التحويل حيث يكون XYZ تقريبًا أي تنسيق تحت الشمس.

نص بديل http://img443.imageshack.us/img443/672/convert.gif

http://www.gimp.org/

طريقة مجانية وقوية لإنشاء ملفات .ico ذات دقة كبيرة 1024x1024 أو أكبر تعمل مع Win7 على الأقل، لقد قمت باختبار ذلك :)

فقط احفظ واكتب .ico

:)

الشفافية سهلة، قم بتحميل صورة جديدة وحدد الخيارات المتقدمة، لون الخلفية->الشفافية

سيقوم إصدار Paint الذي يأتي مع نظام التشغيل Windows 7 بتحويل الأيقونات إلى PNG وJPEG وما إلى ذلك...الآن.

لقد واجهت هذه المشكلة للتو.لمعلوماتك، افتح ملف .ico في الطلاء واحفظه بتنسيق .png.عملت بالنسبة لي!

http://convertico.org/ يسمح للمستخدمين بتحويل ملفات ico متعددة إلى ملفات PNG أو GIF أو JPG في خطوة واحدة.

ربما تكون هذه إجابة سخيفة إلى حد ما، ولكن إذا كنت تحتاج إلى رمز واحد فقط، فيمكنك فقط التقاط لقطة شاشة للرمز الموجود في المجلد وقطع الجزء الذي تريده.تأكد من أن الأيقونة تظهر بالحجم الذي تريده ولها خلفية بيضاء بالطبع.

إذا كنت تستخدم تطبيقًا لائقًا لالتقاط لقطات الشاشة مثل SnagIt أو WinSnap، فمن المفترض أن تتولى أداة التقاط الصور المنطقة هذه المهمة في غضون ثوانٍ قليلة.

لاحظ أن هذا لن يمنحك الشفافية.

إذا كنت لا تبحث عن شيء برمجي، فما عليك سوى "طباعة الشاشة" والاقتصاص.

هناك أداة تحويل عبر الإنترنت متاحة على http://www.html-kit.com/favicon/.بالإضافة إلى توليد .ico وسوف تعطيك أيضا الرسوم المتحركة .gif إصدار.

تحويل الأيقونة هي أداة أخرى عبر الإنترنت مع خيار تغيير الحجم.

بديل آخر سيكون عرفانفيو

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top