Click here to Skip to main content
15,914,452 members
Home / Discussions / C#
   

C#

 
GeneralRe: More if's? Pin
PIEBALDconsult2-Oct-07 11:55
mvePIEBALDconsult2-Oct-07 11:55 
Questionstring to character Pin
Assaf821-Oct-07 12:58
Assaf821-Oct-07 12:58 
AnswerRe: string to character Pin
Luc Pattyn1-Oct-07 13:09
sitebuilderLuc Pattyn1-Oct-07 13:09 
AnswerRe: string to character Pin
Matthew Cuba1-Oct-07 14:00
Matthew Cuba1-Oct-07 14:00 
QuestionChanging the DPI of an image Pin
Christian Graus1-Oct-07 12:56
protectorChristian Graus1-Oct-07 12:56 
AnswerRe: Changing the DPI of an image Pin
TJoe1-Oct-07 13:19
TJoe1-Oct-07 13:19 
GeneralRe: Changing the DPI of an image Pin
Christian Graus1-Oct-07 14:22
protectorChristian Graus1-Oct-07 14:22 
AnswerRe: Changing the DPI of an image Pin
Luc Pattyn1-Oct-07 13:23
sitebuilderLuc Pattyn1-Oct-07 13:23 
Hi Christian,

AFAIK a PNG just holds pixels, it does not know resolution or physical dimensions.

JPEG supports "properties", they populate what gets handled by
Image.PropertyItems, Image.GetPropertyItem(), Image.SetPropertyItem()

IIRC you can not add properties to an image, but you can modify the existing ones;
and they are indexed by number, so you need to figure out the index for each property.
Here are some of them I once found on the web:

propNames.Add(0x010E, "ImageDescription");
propNames.Add(0x010F, "EquipMake");
propNames.Add(0x0110, "EquipModel");
propNames.Add(0x0112, "Orientation");
propNames.Add(0x011A, "XResolution");
propNames.Add(0x011B, "YResolution");
propNames.Add(0x0132, "DateTime");
propNames.Add(0x0128, "ResolutionUnit");
propNames.Add(0x0131, "SoftwareUsed");
propNames.Add(0x0201, "JPEGInterFormat");
propNames.Add(0x0202, "JPEGInterLength");
propNames.Add(0x0213, "YCbCrPositioning");
propNames.Add(0x501B, "ThumbnailData");
propNames.Add(0x502D, "ThumbnailResolutionX");
propNames.Add(0x502E, "ThumbnailResolutionY");
propNames.Add(0x5090, "LuminanceTable");
propNames.Add(0x5091, "ChrominanceTable");
propNames.Add(0x829A, "ExifExposureTime");
propNames.Add(0x9003, "ExifDTOrig");
propNames.Add(0x9004, "ExifDTDigitized");
propNames.Add(0x9204, "ExifExposureBias");
propNames.Add(0x9209, "ExifFlash");
propNames.Add(0x927C, "ExifMakerNote");
propNames.Add(0x9286, "ExifUserComment");
propNames.Add(0xA002, "ExifPixXDim");
propNames.Add(0xA003, "ExifPixYDim");


Hope this helps.


Luc Pattyn [Forum Guidelines] [My Articles]


this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google


GeneralRe: Changing the DPI of an image Pin
Christian Graus1-Oct-07 14:22
protectorChristian Graus1-Oct-07 14:22 
Questionfor loop Pin
Assaf821-Oct-07 12:32
Assaf821-Oct-07 12:32 
AnswerRe: for loop Pin
TJoe1-Oct-07 12:42
TJoe1-Oct-07 12:42 
AnswerRe: for loop Pin
Christian Graus1-Oct-07 12:50
protectorChristian Graus1-Oct-07 12:50 
AnswerRe: for loop Pin
Pete O'Hanlon1-Oct-07 22:04
mvePete O'Hanlon1-Oct-07 22:04 
QuestionNovice help? Pin
MasterSharp1-Oct-07 11:05
MasterSharp1-Oct-07 11:05 
AnswerRe: Novice help? Pin
Malcolm Smart1-Oct-07 11:20
Malcolm Smart1-Oct-07 11:20 
AnswerRe: Novice help? Pin
Christian Graus1-Oct-07 11:32
protectorChristian Graus1-Oct-07 11:32 
QuestionMultithreaded forms application Pin
dsovino1-Oct-07 10:19
dsovino1-Oct-07 10:19 
AnswerRe: Multithreaded forms application Pin
Luc Pattyn1-Oct-07 10:51
sitebuilderLuc Pattyn1-Oct-07 10:51 
QuestionCoding Standard Question Pin
donovan.solms1-Oct-07 9:50
donovan.solms1-Oct-07 9:50 
AnswerRe: Coding Standard Question Pin
Not Active1-Oct-07 9:52
mentorNot Active1-Oct-07 9:52 
AnswerRe: Coding Standard Question Pin
pmarfleet1-Oct-07 10:05
pmarfleet1-Oct-07 10:05 
GeneralRe: Coding Standard Question Pin
donovan.solms1-Oct-07 10:07
donovan.solms1-Oct-07 10:07 
GeneralRe: Coding Standard Question Pin
Pete O'Hanlon1-Oct-07 10:10
mvePete O'Hanlon1-Oct-07 10:10 
GeneralRe: Coding Standard Question Pin
Robert Rohde2-Oct-07 1:52
Robert Rohde2-Oct-07 1:52 
GeneralRe: Coding Standard Question Pin
Pete O'Hanlon2-Oct-07 2:15
mvePete O'Hanlon2-Oct-07 2:15 

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.