PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Apr 30, 2024 9:58 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Apr 07, 2015 10:07 am 
Offline

Joined: Mon Apr 07, 2014 7:34 am
Posts: 7
Hi everybody,

I'm trying to display an image in tiff format (47,7kb). It's an image tiff CMYK + alpha chanel.

I'm using a GDI+ Build and the metod Image.FromFile() keeps on throwing "out of memory exception".

Do you have any solution?

My operating system is Windows 7 Service pack 1 and I'm using Visual Studio 2010.

Attached to this post there is the image tiff that I use.

Edit:
In MSDN Microsoft I read that "If the file does not have a valid image format or if GDI+ does not support the pixel format of the file, this method throws an OutOfMemoryException exception." and "The Image class does not support alpha transparency in bitmaps. To enable alpha transparency, use PNG images with 32 bits per pixel." https://msdn.microsoft.com/en-us/library/stf701f5(v=vs.110).aspx

But I must necessarily to display an image in tiff format with alpha transparency.

Thanks!


Attachments:
File comment: This is file tiff
cmyka.tif
cmyka.tif [ 47.71 KiB | Viewed 4574 times ]
Top
 Profile  
Reply with quote  
PostPosted: Tue Apr 07, 2015 10:50 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3097
Location: Cologne, Germany
Hi!
zoranm80 wrote:
But I must necessarily to display an image in tiff format with alpha transparency.
The current implementation of PDFsharp relies on .NET to read the image file.

You can try the WPF build.

RGB tiff files with alpha transparency work. Is RGB an option?

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Tue Apr 07, 2015 1:05 pm 
Offline

Joined: Mon Apr 07, 2014 7:34 am
Posts: 7
Hi Thomas,

I try use to WPF build but in GDI+ build there is a method that display CMYK image with transparency?

I only have a CMYK image with transparency that I can't convert to other formats.

Thanks for reply.

Edit:
I use also a method Bitmap() as this sample:

base.image = new Bitmap(value);

where "value" is a path of image and his type is a string.

but keeps on throwing exception "Parameter not valid".

Danilo


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 61 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group