Jump to content

Error when opening TIFF file


Henrik

Recommended Posts

Hi there

 

When opening a TIFF file, I get this error:

System.ArgumentException: Parameter is not valid.
   at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData)
   at PaintDotNet.Data.GdiPlusFileType.OnLoad(Stream input) in D:\src\pdn\src\PaintDotNet\Data\GdiPlusFileType.cs:line 127
   at PaintDotNet.FileType.Load(Stream input) in D:\src\pdn\src\Data\FileType.cs:line 496
   at PaintDotNet.Functional.Func.Eval[T1,TRet](Func`2 f, T1 arg1) in D:\src\pdn\src\Base\Functional\Func.cs:line 158

Using v4.0.9 on Windows 7 Pro x64.

I can open the TIFF file okay in "Microsoft Office Picture Manager"

 

I uploaded the file here: http://gpsleg.dk/Solsikkeolie.tiff

 

Do tell if you need any more information.

 

Best regards

 

Henrik

Edited by Henrik
Link to comment
Share on other sites

GDI+ can't open the file, therefore Paint.NET won't be able to open it. Not much that can be done here.

 

(GDI+ is a Windows component for image and graphics stuff. In Windows 7 and later, GDI+ is actually a wrapper around WIC, the Windows Imaging Component. So really, it's WIC that can't open the file.)

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Try installing gdi+ and see if that helps. Interestingly enough, I can open your image in my PDN installed in Linux under Wine. I did install gdi+ on that virtual drive.

 

GDI+ is a component that is built into Windows; it isn't something you'd install (on Windows).

 

I'm pretty sure the Wine implementation of GDI+ is either using Cairo or simply the X server. So you can't compare apples to oranges.

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

https://msdn.microsoft.com/en-us/library/windows/desktop/ms533798(v=vs.85).aspx

 

What's interesting here, is that I can't open that .tiff file on PDN v4.0.9 in Win10. I can however open it fine in PhotoShop v7 (14 year old program) along with Irfanview on the same system. I find that fascinating, even though I have no idea why that is. 

 

I wonder if it has to due with the Alpha Channel in the tiff image? The Alpha Channel is correctly displayed in PhotoShop, but everything else I've tried, just flattens it. It's also encoded with CMYK colorspace.

 

If anyone is interested, here is the metadata on the tiff file as reported by Gimp:

 

Hidden Content: metadata





2015-06-09T16:45:53+02:00
2011-10-06T09:13:29
0
2015-06-09T16:45:53+02:00
Adobe Photoshop CC 2014 (Macintosh)



image/tiff


unknown





1480813790
18/1 55/1 0/0 0/0
EF-S18-55mm f/3.5-5.6
45
16
0/1
unknown
1.1.0



_MG_5809.CR2
5.7
5.0
As Shot
3250
+6
0.00
5
+50
+25
0
25
0
25
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
25
50
75
+1.0
25
0
0
0
False
Medium Contrast
Adobe Standard
3E87BAD76D425A28CE9A20DF0E1EDB86
True
0.336028
0.036952
0.681293
0.796767
0
True
True


0, 0
32, 22
64, 56
128, 128
192, 196
255, 255





4
Coated FOGRA39 (ISO 12647-2:2004)
2011-10-06T09:13:29



xmp.iid:2d98d6fe-c829-4a6c-a211-e03379b1ba89

xmp.did:05F9F0390D20681192B0DFE1678EEE74







100
unknown
1480813790
EF-S18-55mm f/3.5-5.6


18/1
55/1
0/0
0/0






Edited by dipstick

69unju0.gif

Link to comment
Share on other sites

Looks to me like the problem is in the ability for PDN to open a CMYK Color tiff file. I imported the OP's tiff file in PhotoShop, changed color mode from CMYK to RGB and exported to tiff. It opened fine in PDN v4.0.9 in Win10 and the Alpha Channel was displayed correctly.

 

That's my unscientific analyst anyway..........

69unju0.gif

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...