.net - Printing Image in C#, colors more opaque than printing from OS -


i'm trying print jpg image winforms application, need colors close original image resulting colors more opaque comparing them image printed os (from windows photo viewer or word).

this code:

private void printdocument1_printpage(object sender, system.drawing.printing.printpageeventargs e)     {         e.graphics.pageunit = graphicsunit.pixel;         e.graphics.smoothingmode = system.drawing.drawing2d.smoothingmode.highquality;         e.graphics.pixeloffsetmode = system.drawing.drawing2d.pixeloffsetmode.highquality;         e.graphics.interpolationmode = system.drawing.drawing2d.interpolationmode.highqualitybicubic;         //e.graphics.textrenderinghint = system.drawing.text.textrenderinghint.antialiasgridfit;         e.graphics.compositingquality = system.drawing.drawing2d.compositingquality.gammacorrected;         e.graphics.compositingmode = system.drawing.drawing2d.compositingmode.sourcecopy;         var img = image.fromfile(@"c:\photo.jpg", true);         e.graphics.drawimage(img, 0, 0);     }      private void button1_click(object sender, eventargs e)     {         var result = printdialog1.showdialog();         if (result == system.windows.forms.dialogresult.ok)         {             printdocument1.printersettings = printdialog1.printersettings;             printdocument1.print();         }     } 

i've tried different values graphics properties (smoothingmode, pixeloffsetmode, ...) cannot real colors. example black more grey when printed application, printed word close black.

i cannot send complete photo, section of jpg same properties:

enter image description here


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -