Jump to content

My IMAGE files open in other apps, but NOT in PDN !!!


hypercat

Recommended Posts

Hello Everyone-    My BMP image files CAN be opened in other apps (MS Paint, SketchBook, etc)....but now they are NOT opening in my ONLY reliable (MAIN) photo-editing app, Paint.net !!!  This started several moths ago after i updated to WINDOWS 10.

 

ALL my PICTURE files are saved in BMP (a lossless format), and are set to open with PAINT.NET as the DEFAULT (unless i specifically choose another app).

Heres an example : 

 

1.  to get to one of my vintage MAGAZINE cover images, starting from my PICTURES folder, there are EIGHT categorized sub-folders.

2.  There, i choose a file (a cover-image).

3.  When i L-click on it, this msg appears in a small window :  "The directory could not be found". 

4.  When i L-click on DETAILS in that window, this file-path info appears :

 

System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Paul M\Pictures\DIGITAL Photography & Video\Special Photo Collections\PMA Collection\1. Architectural\1. Publication Covers & Pics - 1920-2000\01. Publication Covers - 1920-2000\01 - Mags - 1920-Present\2. American - 1960-Present\INS - CMS\1965-No04_Central.bmp'.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)

   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)

   at PaintDotNet.Controls.DocumentWorkspace.LoadDocument(Control owner, String fileName, FileType& fileTypeResult, ProgressEventHandler progressCallback) in D:\src\pdn\src\PaintDotNet\Controls\DocumentWorkspace.cs:line 3191

 

This is happening with ALL my picture images !  Anyone know WHY?....or of any FIX ?    - hypercat  ?

Edited by hypercat
Additional relevant info.
Link to comment
Share on other sites

toe -  thx for the reply !  Below is the DETAILS info you requested (which i just now added to my post).

 

ALL my PICTURE files are saved in BMP, and set to open with PAINT.NET as the DEFAULT, unless i specifically choose another app.

Heres an example : 

1. to get to one of my vintage MAGAZINE cover images, starting from my PICTURES folder, there are EIGHT categorized sub-folders.

2.  There, i choose a file (a cover-image).

3.  When i L-click on it, this msg appears in a small window :  "The directory could not be found". 

4.  When i L-click on DETAILS in that window, this file-path info appears :

 

System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Paul M\Pictures\DIGITAL Photography & Video\Special Photo Collections\PMA Collection\1. Architectural\1. Publication Covers & Pics - 1920-2000\01. Publication Covers - 1920-2000\01 - Mags - 1920-Present\2. American - 1960-Present\INS - CMS\1965-No04_Central.bmp'.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)

   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)

   at PaintDotNet.Controls.DocumentWorkspace.LoadDocument(Control owner, String fileName, FileType& fileTypeResult, ProgressEventHandler progressCallback) in D:\src\pdn\src\PaintDotNet\Controls\DocumentWorkspace.cs:line 3191

 

- hypercat

Link to comment
Share on other sites

Could it be a file/folder path length issue? The path shown in that example is VERY long. I have no idea about Win10/NTFS/PDN character/folder limits but it would be the first thing I'd test even if only to exclude it.

 

Try copying one of the problem BMPs to a new temporary folder in Documents and then seeing if the problem persists when using PDN. 

  • Upvote 1

IHaveNoName.png

Link to comment
Share on other sites

C:\Users\Paul M\Pictures\DIGITAL Photography & Video\Special Photo Collections\PMA Collection\1. Architectural\1. Publication Covers & Pics - 1920-2000\01. Publication Covers - 1920-2000\01 - Mags - 1920-Present\2. American - 1960-Present\INS - CMS\1965-No04_Central.bmp

 

Yeah, @IHaveNoName nailed it. The length of the file path is too long, at 270 characters. The max is 260. This is an old school limitation of Windows, although there are ways to work around it. I've been meaning to update the support for this, but never had enough justification to do so. I'll look into it for an upcoming update in the shorter term.

 

For now you'll have to use shorter folder names, or less nesting, or something to get the full path name under 260 characters.

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

I might have a workaround, especially since you're on Windows 10. You may need to make sure you're on the latest version of Windows 10, however. 

 

1. In File Explorer, find the image that you want to open

2. Right click on it while holding shift and select "Copy as Path"

3. Open up a command prompt (right click on Start -> Run -> "cmd" and then press Enter)

4. Type the following, without quotes: "cd C:\Program Files\paint.net" and press enter

5. Then type "paintdotnet" (without quotes) followed by a space and then press Ctrl+V to paste the path that was copied in step 2

6. Press enter

 

You'll see the path copied as something starting with "\\?\ and that's correct, albeit weird.

 

Using this, I was able to open a file whose path length was 326 characters. The File->Open dialog, which is supplied by Windows, refuses to allow simple point-and-click for this.

 

However, good newsI've just made a change for 4.1 (final/public release coming soon!) that will allow this to work normally, even with the File->Open dialog. You will first have to enable a Group Policy setting, which is something I unfortunately can't simplify. You can do this now to get ready for when 4.1 is available. Here's how to do that:

 

1. Open up the Local Group Policy Editor. Click on start, type in "Edit group policy", and click on the obvious thing.


image.png

 

2. Navigate to Local Computer Policy -> Computer Configuration -> Administrative Templates -> System -> Filesystem

 

image.png

 

3. In the right pane, find "Enable Win32 long paths" and double-click on it

 

image.png

 

4. Click on the "Enabled" radio button

 

image.png

 

5. Click on OK

 

6. If Paint.NET is already open, close it and restart it. Now it'll work with these "long path" files.

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

13 hours ago, Rick Brewster said:

Also, if you're going for lossless storage of images, I highly recommend using PNG instead of BMP.

 

Hi Rick -    Thx very much for that latest solution !  I will try it ASAP and report to you the result (....gotta get some sleep now).

 

BTW -   Why PNG over BMP ?    - hypercat  ?

Link to comment
Share on other sites

4 hours ago, hypercat said:

Why PNG over BMP ?

 

Both PNG and BMP can store 24-bit lossless images, however...

 

PNG also has an alpha channel, so it stores transparency AND the PNG format is compressed so it takes up less space on your drive.

Link to comment
Share on other sites

PNG is a much richer and fully standardized file format. BMP is kind of a weird Windows format that isn't unambiguously specified in some important areas (like alpha channel handling).

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

Im trying to DELETE my incomplete reply here, but theres no DELETE option, and these incompleted replies keep replicating automatically themselves on the topic page!!! (not my intention)

Edited by hypercat
Link to comment
Share on other sites

11 minutes ago, hypercat said:

I clicked ENTER.

 

There's your problem.

 

Rick never said to click ENTER.

 

You need to type "Edit group Policy" and then click on the "Edit group policy" in the best match portion of the menu.

 

As shown in his screenshot:

 

On 8/24/2018 at 3:55 PM, Rick Brewster said:

image.png

 

Link to comment
Share on other sites

Bolt-  thx for the reply.  Its just a little confusing to me.  Also, my incomplete reply to Rick was suddenly replicated automatically a few times but i didnt mean to do that or authorize that (and tried to fix those, because i dont see a DELETE option anywhere).  i will try Rick's solution again, but as he related, its not a simple procedure.

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...