Giter Club home page Giter Club logo

Comments (7)

lilith avatar lilith commented on September 27, 2024 1

I think this is a codec problem: image-rs/image-gif#138

from imageflow.

lilith avatar lilith commented on September 27, 2024

from imageflow.

FlipSs avatar FlipSs commented on September 27, 2024

Hi, here are 2 resize steps, they are the same because this is an example, but the second is executed on the result of the first.

public async Task Test(byte[] gif)
{
        // first resize 
	var converted = await ConvertAsync(gif);
	// second resize
	await ConvertAsync(converted); // throws error
}

from imageflow.

lilith avatar lilith commented on September 27, 2024

from imageflow.

FlipSs avatar FlipSs commented on September 27, 2024

doesn't work either

from imageflow.

ajbeaven avatar ajbeaven commented on September 27, 2024

I think I may be hitting something related to this with imageflow-dotnet-server too.

Here's an example GIF I got off Google Images that when stored in Azure Storage (don't think this is relevant) and referenced by imageflow-dotnet-server, fails to render correctly:

4016070_24725e92-1b64-4c96-b927-2b2ed2e2452b

Stack trace for this error:

Imageflow.Bindings.ImageflowException: ImageMalformed: "unexpected EOF" at
imageflow_core\src\codecs\gif\mod.rs:57:91
https://github.com/imazen/imageflow/blob/1f6dc67eef41132d5d3300676daa5d42ae7f8941/imageflow_core\src\codecs\gif\mod.rs#L57
imageflow_core\src\codecs\gif\mod.rs:162:54
https://github.com/imazen/imageflow/blob/1f6dc67eef41132d5d3300676daa5d42ae7f8941/imageflow_core\src\codecs\gif\mod.rs#L162
imageflow_core\src\flow\nodes\codecs_and_pointer.rs:222:65
https://github.com/imazen/imageflow/blob/1f6dc67eef41132d5d3300676daa5d42ae7f8941/imageflow_core\src\flow\nodes\codecs_and_pointer.rs#L222
imageflow_core\src\flow\execution_engine.rs:477:114
https://github.com/imazen/imageflow/blob/1f6dc67eef41132d5d3300676daa5d42ae7f8941/imageflow_core\src\flow\execution_engine.rs#L477
imageflow_core\src\context.rs:419:59
https://github.com/imazen/imageflow/blob/1f6dc67eef41132d5d3300676daa5d42ae7f8941/imageflow_core\src\context.rs#L419
imageflow_core\src\context_methods.rs:50:68
https://github.com/imazen/imageflow/blob/1f6dc67eef41132d5d3300676daa5d42ae7f8941/imageflow_core\src\context_methods.rs#L50
Active node:
NodeDebugInfo {
    stable_id: 464,
    params: Json(
        Decode {
            io_id: 0,
            commands: None,
        },
    ),
    index: NodeIndex(1),
}


   at Imageflow.Bindings.JobContext.AssertReady()
   at Imageflow.Bindings.JobContext.SendJsonBytes(String method, Byte[] utf8Json)
   at Imageflow.Bindings.JobContext.Execute[T](T message)
   at Imageflow.Fluent.ImageJob.FinishAsync(JobExecutionOptions executionOptions, SecurityOptions securityOptions, CancellationToken cancellationToken)
   at Imageflow.Server.ImageJobInfo.ProcessUncached()
   at Imageflow.Server.ImageflowMiddleware.<>c__DisplayClass15_0.<<ProcessWithStreamCache>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Imazen.HybridCache.AsyncCache.<>c__DisplayClass35_0.<<GetOrCreateBytes>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Imazen.Common.Concurrency.AsyncLockProvider.TryExecuteAsync(String key, Int32 timeoutMs, CancellationToken cancellationToken, Func`1 success)
   at Imazen.HybridCache.AsyncCache.GetOrCreateBytes(Byte[] key, AsyncBytesResult dataProviderCallback, CancellationToken cancellationToken, Boolean retrieveContentType)
   at Imazen.HybridCache.HybridCache.GetOrCreateBytes(Byte[] key, AsyncBytesResult dataProviderCallback, CancellationToken cancellationToken, Boolean retrieveContentType)
   at Imageflow.Server.ImageflowMiddleware.ProcessWithStreamCache(HttpContext context, String cacheKey, ImageJobInfo info)
   at Imageflow.Server.ImageflowMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

from imageflow.

lilith avatar lilith commented on September 27, 2024

The "big hug" image is malformed, and the codec I use doesn't support recovering from that (yet).

$ # /usr/bin/giftopnm is owned by netpbm 10.73.37-2
$ giftopnm /tmp/139770827-18e25c4e-eb0a-4058-ba48-ddc3849090ee.gif > /dev/null 
giftopnm: Error accessing Image 67 of stream.  File read error where start of image descriptor or end of GIF expected.  End of file encountered

from imageflow.

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.