Bug SV-46
1 vote

Icon not accepted by Full Viewer

Created by Martin Kraska on 3/23/2014 2:37 PM Last Updated by Davide on 5/21/2014 5:52 PM
%
 (hrs)
Logged: 0   (hrs)

 Description

The attached icon is not accepted in the Icon change dialog. error message:(pictture must be an image that can be used as icon)

The image is the favicon of www.fh-brandenburg.de.

Informationen über das Aufrufen von JIT-Debuggen
anstelle dieses Dialogfelds finden Sie am Ende dieser Meldung.

************** Ausnahmetext **************
System.ArgumentException: Das Argument picture muss ein Bild sein, das als Icon verwendet werden kann.
   bei System.Drawing.Icon.Initialize(Int32 width, Int32 height)
   bei System.Drawing.Icon..ctor(String fileName, Int32 width, Int32 height)
   bei ViewerFileType.OptionsDialog.ReadIconFromFile(String path)
   bei System.Windows.Forms.Control.OnClick(EventArgs e)
   bei System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.ButtonBase.WndProc(Message& m)
   bei System.Windows.Forms.Button.WndProc(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Geladene Assemblys **************
mscorlib
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.50727.5477 (Win7SP1GDR.050727-5400).
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll.
----------------------------------------

    Davide (Wednesday, May 21, 2014 5:52 PM) #

I suppose the problem is that the icon is compressed (pratically is a PNG file with different extension - this is supported by the modern browsers, but is not a standard ICO file format)

You can use GIMP (export -> *.ico file -> uncompressed) to have a standard icon.

Anyway (for Andrey) here there is a good C# code to convert png to ico.