TIFF export

Oystein Bjorke 10 lat temu 0
This discussion was imported from CodePlex

ambrein2 wrote at 2014-01-24 17:47:

Does OxyPlot support exporting reports to TIFF files? I really need that feature and I like OxyPlot so far but not sure if it supports TIFF. Any ideas? If it doesn't support does anyone know of a solution out there for TIFF export?

objo wrote at 2014-01-25 22:50:

Can TIFF be used for reports - text and tables and so on??

Or do you want to export plots in a report to TIFF?
Only PNG is supported - see the PngExporter on most platforms.
http://oxyplot.org/doc/API/OxyPlot.Wpf.PngExporter.html

For WPF you can easily add TIFF export: Create a class like PngExporter, and replace the PngBitmapEncoder by a TiffBitmapEncoder
http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.tiffbitmapencoder(v=vs.110).aspx

ambrein2 wrote at 2014-01-27 17:21:

Hi objo,

Yes I want to be able to export plots in a report to TIFF. Thanks for the links to TiffBitmapEncoder. I will try out what you have suggested. Do you think the quality of exported tiff will be good using TiffBitmapEncoder? One of my requirements is that when zoomed in to the TIFF report should still have high quality(no jaggies).

Thanks,
Mandar

objo wrote at 2014-01-27 19:16:

If you want scalable graphics, you should export to SVG or PDF. Both are supported in the core library of OxyPlot!

If you implement a exporter based on TiffBitmapEncoder, try TiffCompressOption.None:
http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.tiffcompressoption(v=vs.110).aspx