-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jp2ksaveStream throws an error: Is Jpeg 2000 not fully implemented? #147
Comments
See #142 (comment) for the reason why saving to JPEG 2000 isn't supported by default. You could use the NetVips.Extensions NuGet package for converting a GDI+ bitmap to NetVips and vice versa (with the |
Kleis,
I’ve installed NetVips.Extensions, and will look into .ToBitmap. However, I now have 3 NuGet packages installed:
NetVips 2.0.1 : .NET bindings for libvips (though I suspect this may be a 32bit version of NetVips.Native.winx64 so may not need it, but am unsure)
NetVips.Extensions 2.0.0: a set if extension methods and helpers for NetVips (heard a rumor that it contains a .ToBitmap method which may solve one of my other problems)
NetVips.Native.win-64 8.11.4 (I suspect this replaces the need for NetVips 2.0.1)
Is NetVips 2.0.1 necessary if I also have NetVips.Native.win-64 8.11.4 also installed? Or the other way around? And if I have one (or both) of these installed, do I *also* have libvips installed now? Or is that an entirely separate installation?
Michael
From: Kleis Auke Wolthuizen ***@***.***>
Sent: Saturday, October 9, 2021 4:38 AM
To: kleisauke/net-vips ***@***.***>
Cc: Michael Scott ***@***.***>; Author ***@***.***>
Subject: Re: [kleisauke/net-vips] Jp2ksaveStream throws an error: Is Jpeg 2000 not fully implemented? (#147)
See #142 (comment)<#142 (comment)> for the reason why saving to JPEG 2000 isn't supported by default.
You could use the NetVips.Extensions<https://www.nuget.org/packages/NetVips.Extensions> NuGet package for converting a GDI+ bitmap to NetVips and vice versa (with the ToBitmap() and ToVips() functions). It should be faster than encoding/decoding the image to a JPEG (or PNG, TIFF, etc.) memory stream. Note that the conversion to a WPF image isn't supported by this package (see #81<#81>).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#147 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ARZ2TV46MD3SGPPNZFE5BGLUGASSTANCNFSM5FUVE2TQ>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
NOTICE: This communication may contain privileged or other confidential information. If you have received it in error, please advise the sender by reply email and immediately delete the message and any attachments without copying or disclosing the contents. Thank you.
|
Sadly, ToBitmap isn't working. The method is failing on this line in your code:
Which is equivalent to
This line fails because the image is too big. So unless you guys have another idea, I'm looking into how I can load each individual tile on a Page instead of the entire page in a pyramidal file structure. Do you have any examples of that, instead of loading each page at once? |
I'm not sure if there is a workaround for this GDI+ limitation other than avoiding |
I hope this information helped. Please feel free to re-open if questions remain. |
We have images in a pyramidal tiff file that are of 81920 x 98304, so using JpegsaveStream won't work, as it has a 65500 x 65500 size limit. So we are trying to use Jp2ksaveSteam instead. However, it throws this error:
Does libvips and / or NetVips not support Jpeg 2000? We are trying to insert a libvips Image into a WPF Window, so are trying to move the stream into a BitmapSource. But I am even willing to place it into a Windows Forms Bitmap. Here is the method I'm using:
Am I doing something wrong? Is Jpeg 2000 not supported? Is there another way to do this?
Michael
The text was updated successfully, but these errors were encountered: