Comments (7)
I think this is a codec problem: image-rs/image-gif#138
from imageflow.
from imageflow.
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.
from imageflow.
doesn't work either
from imageflow.
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:
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.
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)
- Some png files when resized with png.quality results as empty/transparent png file HOT 5
- Rename imageflow cli tool to something more convenient/shorter HOT 1
- When IDCT preshrinking is active, &zoom=x command may apply to preshrunk dimensions instead
- Investigate differences between ImageResizer4 f.sharpen and Imageflow
- Add compatibility for IR4 ?format=webp&quality=x
- imageflow_tool v1/querystring imlement print to stdout HOT 3
- too much time on a medium size file HOT 4
- jpeg Quality: bug or feature HOT 4
- CI feature: integrate pull request preview environments
- Require support for BMP files HOT 11
- Provide a sharper set of defaults for e-commerce solutions
- [RFC] Add a new syntax for srcset
- Massive linux .so build
- Azure Web App (Code,Linux,Net7) Error: Looking for "libimageflow.so" HOT 10
- How to use imageflow_tool on a managed server HOT 3
- Investigate libwebp CVE-2023-1999 HOT 4
- Evaluate migrating to gif-dispose
- possible to run in alpine container? HOT 1
- "'cargo' is required, but missing" error on Windows HOT 3
- Issue with Cropping Animated Gifs HOT 3
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 imageflow.