Comments (11)
Hi!
Thanks for the detailed report. I tried it and got it to crash as well, but no idea what's causing it yet.
I'll investigate more tomorrow!
from bcnencoder.net.
New version of the extension package is up!
https://www.nuget.org/packages/BCnEncoder.Net.ImageSharp/1.1.1
This should fix the issue you were having. If you find any other issues, please let me know.
from bcnencoder.net.
Tested, now it works like a charm, thanks, you saved my life!
from bcnencoder.net.
Many thanks!!, I really hope you can come out with a solution.
from bcnencoder.net.
Hi, I've been troubleshooting the issue the entire afternoon and I discover the following:
- It happens with images bigger than 1024px either for their height or width. For example, a 1024x2048 PNG will crash.
- It happens with ANY format.
- I created a workaround where the image is resized, but it just works once, so if the image is 4096x4096 it will still crash since 2048 crashes the program.
- It happens with images with and without transparency.
from bcnencoder.net.
Looks like a new ImageSharp release broke my extension package.
In the new version, images larger than 1024x1024 get allocated from a pool that contains buffers larger than the required size, which breaks things when trying to convert ImageSharp image memory to Memory2D. I should have a fix out in a couple of hours.
Thanks again for the report!
from bcnencoder.net.
Looks like a new ImageSharp release broke my extension package.
In the new version, images larger than 1024x1024 get allocated from a pool that contains buffers larger than the required size, which breaks things when trying to convert ImageSharp image memory to Memory2D. I should have a fix out in a couple of hours.
Thanks again for the report!
What about the BCnEncoder45.NET users :(
from bcnencoder.net.
Totally forgot about that.. I'll fix it as well. Should be done in about an hour
from bcnencoder.net.
Scratch that. There's no ImageSharp integration in that version so I can't really fix it.
@Maxxxel are you using ImageSharp and BcnEncoder.Net45 together in your own project?
The fix for me was to not use Image.TryGetSinglePixelSpan
, and instead, just loop over the pixels row by row and column by column.
Something like this
for (var y = 0; y < img.height; y++)
{
for (var x = 0; x < img.width; x++)
{
var i = y * img.width + x;
img[x, y] = new Rgba32(decoded[i].r, decoded[i].g, decoded[i].b);
}
}
Maybe your problem is similar?
Or if you can provide more info I can provide more help.
from bcnencoder.net.
I was looking for a different solution and found a Paint.Net plugin I can load and use for bitmap->DDS. But thanks for your effortsβ€οΈ
from bcnencoder.net.
Glad you figured out a solution π¦π
If you do end up using BCnEncoder, don't hesitate to ask questions. I'll be glad to help
from bcnencoder.net.
Related Issues (20)
- Add cubemap decoding API to ImageSharp extensions
- Separate KTX and DDS fileformats into their own extension package BCnEncoder.Net.FileFormats
- Figure out something to replace HdrImage
- Rework the public and internal API for 3.0
- Support for Unity3D HOT 12
- Add VTF (Valve Texture Format) support
- Add CRN (Crunch file format) support
- Look into adding clustered encoding support
- Improve readme.md example HOT 1
- Possible corruption decoding BC6h uf16 HOT 3
- UASTC Support
- ETC1S Support
- KTX2 File format support
- RDO
- Add option to recalculate blue channel for prenormalized bc5 normals HOT 2
- Migrate from Microsoft.Toolkit.HighPerformance to CommunityToolkit.HighPerformance HOT 1
- Make `DecodeRaw` accept `ReadOnlyMemory<byte>` HOT 1
- `DecodeAllMipMaps2D(DdsFile)` returns empty array if `dwMipMapCount` is 0 even when there is a face with mip maps HOT 1
- Possible bug in BC2/3 decoding
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bcnencoder.net.