473,394 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

p.Save(fileName, Imaging.ImageFormat.Icon) does not produce an icon file

Private Sub SaveBitmap(ByVal fileName As String, ByVal p As
System.Drawing.Bitmap)
...snip

p.Save(fileName, Imaging.ImageFormat.Icon)

Does not produce an icon formatted file.

At least if I try to open it with icon reading programs it does not open.

Is this a know bug?

Are my expectations wrong?

Thanks in advance
Feb 5 '07 #1
4 3557
p.Save(fileName, Imaging.ImageFormat.Icon)
>
Does not produce an icon formatted file.
ImageFormat.Icon may be used to decode an icon file not create one as there
is no Icon encoder in gdiplus.
>
At least if I try to open it with icon reading programs it does not open.
That is the expected result as you there is no encoder for the .ico format.
Is this a know bug?
No.
>
Are my expectations wrong?
Yes. Take a look at the image encoders and decoders on MSDN. You may read
..ico files but not write them with the System.Drawing.Bitmap.
Feb 5 '07 #2
I was just reading this article
http://support.microsoft.com/default...;en-us;q316563 after
replicating your issue.
"Michael Phillips, Jr." <mp*********@nospam.jun0.c0mwrote in message
news:uZ**************@TK2MSFTNGP03.phx.gbl...
>p.Save(fileName, Imaging.ImageFormat.Icon)

Does not produce an icon formatted file.

ImageFormat.Icon may be used to decode an icon file not create one as
there is no Icon encoder in gdiplus.
>>
At least if I try to open it with icon reading programs it does not open.

That is the expected result as you there is no encoder for the .ico
format.
>Is this a know bug?

No.
>>
Are my expectations wrong?

Yes. Take a look at the image encoders and decoders on MSDN. You may
read .ico files but not write them with the System.Drawing.Bitmap.

Feb 5 '07 #3
thanks

"Michael Phillips, Jr." <mp*********@nospam.jun0.c0mwrote in message
news:uZ**************@TK2MSFTNGP03.phx.gbl...
>p.Save(fileName, Imaging.ImageFormat.Icon)

Does not produce an icon formatted file.

ImageFormat.Icon may be used to decode an icon file not create one as
there is no Icon encoder in gdiplus.
>>
At least if I try to open it with icon reading programs it does not open.

That is the expected result as you there is no encoder for the .ico
format.
>Is this a know bug?

No.
>>
Are my expectations wrong?

Yes. Take a look at the image encoders and decoders on MSDN. You may
read .ico files but not write them with the System.Drawing.Bitmap.

Feb 5 '07 #4
thanks, that's an interesting site
"AMDRIT" <am****@hotmail.comwrote in message
news:uj**************@TK2MSFTNGP06.phx.gbl...
>I was just reading this article
http://support.microsoft.com/default...;en-us;q316563 after
replicating your issue.
"Michael Phillips, Jr." <mp*********@nospam.jun0.c0mwrote in message
news:uZ**************@TK2MSFTNGP03.phx.gbl...
>>p.Save(fileName, Imaging.ImageFormat.Icon)

Does not produce an icon formatted file.

ImageFormat.Icon may be used to decode an icon file not create one as
there is no Icon encoder in gdiplus.
>>>
At least if I try to open it with icon reading programs it does not
open.

That is the expected result as you there is no encoder for the .ico
format.
>>Is this a know bug?

No.
>>>
Are my expectations wrong?

Yes. Take a look at the image encoders and decoders on MSDN. You may
read .ico files but not write them with the System.Drawing.Bitmap.


Feb 5 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: RickL | last post by:
I have an ASP application that uploads a specified file to the server. To retrieve the file, I simply assign the filepath and file to a hyperlink on the page. When you click "Save Target As" for...
0
by: Morten Overgaard | last post by:
Hi Anybody knows how to save an "embedded object" from the clipboard to a file with the correct filename ( can it be extracted from the clipboard ??) And How do I do it vice versa... ...
1
by: Julia | last post by:
Hi, Is it possible to save ArrayList or other type in a resource file? I need to populate a list box with a predefined options and I would like to save them in a resource file I also don't...
0
by: Olav Tollefsen | last post by:
I have an .aspx file with the following code in Form_Load: image = System.Drawing.Image.FromFile(imageFilename); Response.ContentType = "image/jpeg"; image.Save(Response.OutputStream,...
3
by: David A. Osborn | last post by:
I currently have a class that has an enumeration of graphics extensions that it supports ie: Public Enum GraphicFormats JPG JPEG BMP TIFF End Enum
1
by: asillam | last post by:
Hi I`m trying to automate saving Excel sheets (each one) in csv file format with vbScript. Loop preferable I tried something... please someone help me. Sub CSV2() Dim appExcel As...
6
scubak1w1
by: scubak1w1 | last post by:
Hello, I have been Googling for a bit now as to how to let the user save the current page via a 'clickable icon' to an HTML file (i.e., on the client side.) That is, I am presenting a lot of...
24
by: Petyr David | last post by:
I've seen a few ideas - figured I'd run it up the flagpole and see if anyone saluted Thanks in advance
1
by: chennaibala | last post by:
can any one send me mutiple image upload program and save the file name with extension in mysql table.we must cheak uploaded file type like bmp or any image file while uploading. i develop...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.