hypercat Posted August 24, 2018 Share Posted August 24, 2018 (edited) 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 August 24, 2018 by hypercat Additional relevant info. Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted August 24, 2018 Share Posted August 24, 2018 What error message does it show you? Quote (June 9th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
hypercat Posted August 24, 2018 Author Share Posted August 24, 2018 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 Quote Link to comment Share on other sites More sharing options...
IHaveNoName Posted August 24, 2018 Share Posted August 24, 2018 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. 1 Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted August 24, 2018 Share Posted August 24, 2018 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. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Pixey Posted August 24, 2018 Share Posted August 24, 2018 Cute new Avatar Mr Brewster - it took me by surprise ? Quote How I made Jennifer & Halle in Paint.net My Gallery | My Deviant Art "Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon. Link to comment Share on other sites More sharing options...
Rick Brewster Posted August 24, 2018 Share Posted August 24, 2018 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 news: I'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. 2. Navigate to Local Computer Policy -> Computer Configuration -> Administrative Templates -> System -> Filesystem 3. In the right pane, find "Enable Win32 long paths" and double-click on it 4. Click on the "Enabled" radio button 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. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Rick Brewster Posted August 24, 2018 Share Posted August 24, 2018 Also, if you're going for lossless storage of images, I highly recommend using PNG instead of BMP. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
hypercat Posted August 25, 2018 Author Share Posted August 25, 2018 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 ? Quote Link to comment Share on other sites More sharing options...
BoltBait Posted August 25, 2018 Share Posted August 25, 2018 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. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Computer Dominos Game Link to comment Share on other sites More sharing options...
Rick Brewster Posted August 25, 2018 Share Posted August 25, 2018 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). Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
hypercat Posted August 25, 2018 Author Share Posted August 25, 2018 (edited) 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 August 25, 2018 by hypercat Quote Link to comment Share on other sites More sharing options...
BoltBait Posted August 25, 2018 Share Posted August 25, 2018 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: Quote Download: BoltBait's Plugin Pack | CodeLab | and a Computer Dominos Game Link to comment Share on other sites More sharing options...
hypercat Posted August 25, 2018 Author Share Posted August 25, 2018 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.