pdurdin Posted July 17, 2019 Share Posted July 17, 2019 With the latest update of Paint.NET 4.2 (July 13 build) I can no longer open JPGs as developed from my NEF raw images with RawTherapee 5.1 -- with earlier versions of Paint.NET I never encountered this issue. Here's the error it gives: Application version: paint.net 4.2 System.InvalidCastException: Variant type 4108 not supported at PaintDotNet.SystemLayer.Native.x64.NativeConversions.FromPROPVARIANT(tagPROPVARIANT* propVariant) at PaintDotNet.SystemLayer.Native.x64.Imaging.WICMetadataQueryReader.TryGetMetadataByName(String name, Object& value) at PaintDotNet.Imaging.MetadataQueryReaderExtensions.TryGetMetadataByName(IMetadataQueryReader metadata, String name) in D:\src\pdn\src\Core\Imaging\MetadataQueryReaderExtensions.cs:line 80 at PaintDotNet.Imaging.MetadataQueryReaderExtensions.<GetEntries>d__5.MoveNext() in D:\src\pdn\src\Core\Imaging\MetadataQueryReaderExtensions.cs:line 143 at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext() at PaintDotNet.Data.ExifMetadataReader.<EnumerateExifPropertyItems>d__4.MoveNext() in D:\src\pdn\src\PaintDotNet\Data\ExifMetadataReader.cs:line 98 at PaintDotNet.Data.ExifMetadataReader.<EnumerateExifPropertyItems>d__2.MoveNext() in D:\src\pdn\src\PaintDotNet\Data\ExifMetadataReader.cs:line 71 at System.Linq.Buffer`1..ctor(IEnumerable`1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) at PaintDotNet.Collections.EnumerableExtensions.ToArrayEx[T](IEnumerable`1 items) in D:\src\pdn\src\Base\Collections\EnumerableExtensions.cs:line 40 at PaintDotNet.Data.ExifMetadataReader.EnumerateExifPropertyItems() in D:\src\pdn\src\PaintDotNet\Data\ExifMetadataReader.cs:line 41 at PaintDotNet.Data.WicFileTypeHelpers.Load(Stream input, Nullable`1 forcedContainerFormat, Nullable`1 preferredVendor, MetadataTranscoder metadataTranscoder) in D:\src\pdn\src\PaintDotNet\Data\WicFileTypeHelpers.cs:line 74 at PaintDotNet.Data.JpegFileType.OnLoad(Stream input) in D:\src\pdn\src\PaintDotNet\Data\JpegFileType.cs:line 104 at PaintDotNet.FileType.Load(Stream input) in D:\src\pdn\src\Data\FileType.cs:line 482 at PaintDotNet.Functional.Func.Eval[T1,TRet](Func`2 f, T1 arg1) in D:\src\pdn\src\Base\Functional\Func.cs:line 158 Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted July 17, 2019 Share Posted July 17, 2019 Looks like Paint.NET is having trouble reading the image's metadata. Do you have an example image you're willing to share for debugging? Quote (September 25th, 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...
pdurdin Posted July 17, 2019 Author Share Posted July 17, 2019 Sure. Too large to upload here, but this is one of them: https://www.dropbox.com/s/4qt5gtbafarftm2/DSC_2165.jpg Quote Link to comment Share on other sites More sharing options...
BoltBait Posted July 17, 2019 Share Posted July 17, 2019 I downloaded your file and renamed it to .PNG and Paint.NET opened the file just fine. However, the What Is It Plugin identifies it as a .JPEG file format. This actually concerns me. I think @Rick Brewster will have to investigate this. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
null54 Posted July 17, 2019 Share Posted July 17, 2019 6 hours ago, BoltBait said: I downloaded your file and renamed it to .PNG and Paint.NET opened the file just fine. However, the What Is It Plugin identifies it as a .JPEG file format. That would make sense if the image contains some unsupported metadata. In that case Paint.NET would load the image data and skip the metadata (because it is not PNG format metadata). Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait Link to comment Share on other sites More sharing options...
Rick Brewster Posted July 17, 2019 Share Posted July 17, 2019 8 hours ago, BoltBait said: I downloaded your file and renamed it to .PNG and Paint.NET opened the file just fine. However, the What Is It Plugin identifies it as a .JPEG file format. This actually concerns me. I think @Rick Brewster will have to investigate this. If you rename it to another format then Paint.NET will be able to load the image but not the metadata. 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 July 17, 2019 Share Posted July 17, 2019 It sounds like your "RawTherapee" program is emitting a weird bit of metadata that WIC is interpreting as a "vector of variants" (4108 = 0x100C = VT_VECTOR | VT_VARIANT). Anyway thanks for reporting this. I should be able to fix this easily for the 4.2.1 update by skipping over the metadata. Whatever that metadata entry is, it will likely not be preservable, but we'll see 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 July 17, 2019 Share Posted July 17, 2019 I'm able to reproduce the error with that image you put on DropBox 👍 I'm hoping to put out 4.2.1 "soon", by the end of next week maybe. 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...
pdurdin Posted July 17, 2019 Author Share Posted July 17, 2019 (edited) Thanks for the many quick responses! I've updated RawTherapee to the latest version, and still encounter the same issue with JPGs developed from my raw images. However, if I develop them as TIF instead, they retain the same EXIF data but Paint.NET has no trouble opening them (https://www.dropbox.com/s/uqgaw82z47hh01b/DSC_2165.tif if needed for testing). Is there somewhere I can download the previous release of Paint.NET to use until this issue is fixed? Edited July 17, 2019 by pdurdin Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted July 17, 2019 Share Posted July 17, 2019 Just make sure to NOT disable the updater, and to then install 4.2.1 when it's offered. 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...
pdurdin Posted July 17, 2019 Author Share Posted July 17, 2019 49 minutes ago, toe_head2001 said: Older versions can be found here: https://filehippo.com/download_paint.net/history/ Thanks! 4.1.5 installed now and opens the images fine, so I can get on with using that temporarily. 20 minutes ago, Rick Brewster said: Just make sure to NOT disable the updater, and to then install 4.2.1 when it's offered. Will do. Feel free to use those images for any test/debug purposes needed! Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted July 31, 2019 Share Posted July 31, 2019 The beta should fix this: https://forums.getpaint.net/topic/114817-paintnet-421-beta-build-7151/ 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...
pdurdin Posted August 17, 2019 Author Share Posted August 17, 2019 Sorry for the slow response, I'm out on fieldwork and haven't had much chance to test it. But it's all fixed now! Thanks a bunch. 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.