Giter Club home page Giter Club logo

Comments (11)

Nominom avatar Nominom commented on June 1, 2024 1

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.

Nominom avatar Nominom commented on June 1, 2024 1

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.

Hancapo avatar Hancapo commented on June 1, 2024 1

Tested, now it works like a charm, thanks, you saved my life!

from bcnencoder.net.

Hancapo avatar Hancapo commented on June 1, 2024

Many thanks!!, I really hope you can come out with a solution.

from bcnencoder.net.

Hancapo avatar Hancapo commented on June 1, 2024

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.

Nominom avatar Nominom commented on June 1, 2024

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.

Maxxxel avatar Maxxxel commented on June 1, 2024

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.

Nominom avatar Nominom commented on June 1, 2024

Totally forgot about that.. I'll fix it as well. Should be done in about an hour

from bcnencoder.net.

Nominom avatar Nominom commented on June 1, 2024

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.

Maxxxel avatar Maxxxel commented on June 1, 2024

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.

Nominom avatar Nominom commented on June 1, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.