[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.drawing

Derive class from System.Drawing.Image

Tong Du

12/29/2004 8:28:00 AM

If I want to support different format of image, should I derive a class
from System.Drawing.Image? But the Image class marks the default
constructor as internal.

Any ideas?

Thanks,

Tong
1 Answer

Bob Powell

12/29/2004 1:20:00 PM

0

GDI+ uses image decoders to load the formatted data from file and then
stores it internally as a raster with the correct bit-depth. You probably
shouldn't derive a new image type and opt instead for creating a loader that
reads your image format from disk and decodes it into a standard bitmap. You
should also be able to write an encoder that writes it out. Note that the
current set of encoderparameter objects cannot be added to or modified so
this will be a subsystem that has no relation to the existing encoder /
decoder set.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tips...

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/f...

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.





"Tong Du" <tongdu@gmail.com> wrote in message
news:vUtAd.1315$Lf4.1309@news01.roc.ny...
> If I want to support different format of image, should I derive a class
> from System.Drawing.Image? But the Image class marks the default
> constructor as internal.
>
> Any ideas?
>
> Thanks,
>
> Tong