Hi,
i'm facing the following issue:
Original image: 97KB
https://macroluxproduction.blob.core.windows.net/catalog/5ae70c760a902e3090234da1/images/800*800-2.jpg
Through ImageProcessingModule: 128KB
http://cdnmacrolux.flyweb.it/media/5ae70c760a902e3090234da1/images/800*800-2.jpg
From your source code i found a simple Stream.CopyTo when image has no querystring so should not be processed at all and saved to disk as is. Am I correct?
What's even more weird is that all images with original size lower than 128KB grow to exactly 128KB after being processed by the httpmodule; images bigger than 128KB grow to 1.0MB!!
Here it's an example:
https://macroluxproduction.blob.core.windows.net/catalog/5ae70c760a902e3090234da1/images/800800.jpg
http://cdnmacrolux.flyweb.it/media/5ae70c760a902e3090234da1/images/800800.jpg
I can share the project GIT with you if required (on bitbucket)
processing.config default with interceptAllRequests="true"
cache.config
```xml
security.config
```xml<?xml version="1.0" encoding="utf-8"?>
<security>
<services>
<!--Disable the LocalFileImageService and enable this one when using virtual paths. -->
<!--<service name="LocalFileImageService" type="ImageProcessor.Web.Services.LocalFileImageService, ImageProcessor.Web" />-->
<service prefix="media/" name="CloudImageService" type="ImageProcessor.Web.Services.CloudImageService, ImageProcessor.Web">
<settings>
<setting key="MaxBytes" value="8194304"/>
<setting key="Timeout" value="30000"/>
<setting key="Host" value="https://macroluxproduction.blob.core.windows.net/catalog/"/>
</settings>
</service>
<!--<service prefix="remote.axd" name="RemoteImageService" type="ImageProcessor.Web.Services.RemoteImageService, ImageProcessor.Web">
<settings>
<setting key="MaxBytes" value="4194304" />
<setting key="Timeout" value="3000" />
<setting key="Protocol" value="http" />
</settings>
<whitelist>
</whitelist>
</service>-->
</services>
</security>
Why did you delete the issue template? How am I supposed to determine what version you are using etc?
Sorry @JimBobSquarePants, my mistake.
I've update the issue using your template.
Thank you
Thanks for adding the extra detail. I've figured out what is going wrong and will have a fix deployed in the next few days.
Cheers!
Oh!
You were getting the full buffer chunk instead of picture鈥檚 bytes only. That was the problem!
Thank you man, great libraries
A.
Thanks,
Yeah since the stream could grab a buffer of any potential length to satisfy the request.
Hi James,
any ETA for the nuget package?
Thank you,
Alessandro
When it's ready. I'm not a robot.
Most helpful comment
Oh!
You were getting the full buffer chunk instead of picture鈥檚 bytes only. That was the problem!
Thank you man, great libraries
A.