Click here to Skip to main content
15,920,576 members
Home / Discussions / C#
   

C#

 
GeneralRe: AD, Exchange and Icons Pin
totig9-Jul-03 21:48
totig9-Jul-03 21:48 
GeneralRe: AD, Exchange and Icons Pin
Heath Stewart10-Jul-03 3:02
protectorHeath Stewart10-Jul-03 3:02 
Generalcom+ question Pin
jpribele9-Jul-03 9:23
jpribele9-Jul-03 9:23 
GeneralAnother image problem Pin
Mazdak9-Jul-03 6:43
Mazdak9-Jul-03 6:43 
GeneralRe: Another image problem Pin
Kastro9-Jul-03 7:11
Kastro9-Jul-03 7:11 
GeneralRe: Another image problem Pin
Mazdak9-Jul-03 7:39
Mazdak9-Jul-03 7:39 
GeneralRe: Another image problem Pin
Mazdak9-Jul-03 8:10
Mazdak9-Jul-03 8:10 
GeneralRe: Another image problem Pin
Kastro9-Jul-03 9:09
Kastro9-Jul-03 9:09 
What was the Exception that you got?

If you want to save to TIFF format you need to specify an encoder like so:

ImageCodecInfo FindEncoder(ImageFormat format) {
    ImageCodecInfo[] encoders = ImageCodecInfo.GetImageEncoders();
    for (int i = 0; i < encoders.Length; i++)
        if (encoders[i].FormatID == format.Guid)
            return encoders[i];
    return null;
}
 
...
image.Save("target.tiff", FindEncoder(ImageFormat.Tiff), null);
...
Actually the example I gave before for saving an index-formatted image probably should have explicity specified the JPEG encoder even though I believe it uses Image.RawFormat which defaults to the JPEG format (at least on my system).
GeneralRe: Another image problem Pin
Mazdak9-Jul-03 11:29
Mazdak9-Jul-03 11:29 
GeneralRe: Another image problem Pin
Mazdak10-Jul-03 6:12
Mazdak10-Jul-03 6:12 
QuestionSystem.Configuration.ConfigXmlWhitespace? Pin
CBoland9-Jul-03 5:14
CBoland9-Jul-03 5:14 
GeneralMultiimage in one tiff file Pin
Mazdak9-Jul-03 4:27
Mazdak9-Jul-03 4:27 
GeneralMultiple-frame TIFF file Pin
Valeria Bogdevich9-Jul-03 4:48
Valeria Bogdevich9-Jul-03 4:48 
GeneralRe: Multiple-frame TIFF file Pin
Mazdak9-Jul-03 6:45
Mazdak9-Jul-03 6:45 
GeneralWrong characters on printing results Pin
jpeg9-Jul-03 4:15
jpeg9-Jul-03 4:15 
Generalsaving a datagrid Pin
Cristian_Dior8-Jul-03 20:57
Cristian_Dior8-Jul-03 20:57 
GeneralRe: saving a datagrid Pin
perlmunger9-Jul-03 7:21
perlmunger9-Jul-03 7:21 
GeneralRe: saving a datagrid Pin
Cristian_Dior13-Jul-03 20:37
Cristian_Dior13-Jul-03 20:37 
Generalint.ToString() format problem Pin
zecodela8-Jul-03 17:01
zecodela8-Jul-03 17:01 
GeneralRe: int.ToString() format problem Pin
Kastro8-Jul-03 17:51
Kastro8-Jul-03 17:51 
GeneralUserControl rotation Pin
meschian8-Jul-03 12:34
meschian8-Jul-03 12:34 
GeneralRe: UserControl rotation Pin
J. Dunlap8-Jul-03 12:37
J. Dunlap8-Jul-03 12:37 
GeneralImage rotation ?? Pin
azusakt8-Jul-03 23:22
azusakt8-Jul-03 23:22 
GeneralRe: Image rotation Pin
Valeria Bogdevich9-Jul-03 0:08
Valeria Bogdevich9-Jul-03 0:08 
GeneralRe: Image rotation Pin
azusakt9-Jul-03 15:35
azusakt9-Jul-03 15:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.