Comments (12)
What kind of manipulation (if any?) did you try and do on the image before you saved it? Can you attach an example of an original image that causes this to happen?
Thanks.
from jimp.
yep
you can try this image
http://dropcanvas.com/7vbtj
for now no matter with other images...
from jimp.
hello
i've uploaded again an image that cause the problem
http://dropcanvas.com/jti5x
24bit 96ppp image
my code is quite simple
var monimgresize = new Jimp(targetFileUpload, function () {
this.resize(neww, newh).write(targetFileUpload); // save again
});
with neww and newh in scalled to the original (so 2000x1498)
if you have an idea you can save me ;)
thanks a lot
from jimp.
exifs datas of this image
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.0-c061 64.140949, 2010/12/07-10:57:01 ">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/">
<xmpMM:DocumentID>8B4B99099444A7275B7EECED9F2E31FD</xmpMM:DocumentID>
<xmpMM:InstanceID>8B4B99099444A7275B7EECED9F2E31FD</xmpMM:InstanceID>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:format>image/jpeg</dc:format>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/">
<photoshop:ColorMode>3</photoshop:ColorMode>
<photoshop:ICCProfile>sRGB IEC61966-2.1</photoshop:ICCProfile>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:tiff="http://ns.adobe.com/tiff/1.0/">
<tiff:ImageWidth>1558</tiff:ImageWidth>
<tiff:ImageLength>2079</tiff:ImageLength>
<tiff:BitsPerSample>
<rdf:Seq>
<rdf:li>8</rdf:li>
<rdf:li>8</rdf:li>
<rdf:li>8</rdf:li>
</rdf:Seq>
</tiff:BitsPerSample>
<tiff:PhotometricInterpretation>2</tiff:PhotometricInterpretation>
<tiff:SamplesPerPixel>3</tiff:SamplesPerPixel>
<tiff:XResolution>72/1</tiff:XResolution>
<tiff:YResolution>72/1</tiff:YResolution>
<tiff:ResolutionUnit>2</tiff:ResolutionUnit>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:exif="http://ns.adobe.com/exif/1.0/">
<exif:ExifVersion>0221</exif:ExifVersion>
<exif:ColorSpace>1</exif:ColorSpace>
<exif:PixelXDimension>1558</exif:PixelXDimension>
<exif:PixelYDimension>2079</exif:PixelYDimension>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:xmp="http://ns.adobe.com/xap/1.0/">
<xmp:CreateDate>2015-01-05T18:28:42+01:00</xmp:CreateDate>
<xmp:ModifyDate>2014-05-27T09:46:15+02:00</xmp:ModifyDate>
<xmp:MetadataDate>2014-05-27T09:46:15+02:00</xmp:MetadataDate>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>
from jimp.
i've made another test
open in photoshop
modified the size
saved for the web
and the result is different... but always bugged
check here
http://dropcanvas.com/7mu2a
from jimp.
I confirm this issue with a simple jpeg image.
var jimp = new Jimp(newFile, function() {
this.scale(0.9);
this.quality(100);
this.write(newFile, function() {
reply();
})
});
from jimp.
hi @charafsalmi
did you know another library to do that without installing imagemagik or other external tool ?
thanks
from jimp.
hi !
i've found the (fu****g) solution ...
just Math.round your size ....
no comment :'(
from jimp.
Nope. I don't know any other one.
What do you mean by "just Math.round your size .... ", could you give an example ?
Thanks.
from jimp.
i've did a pull request for this =)
#4
from jimp.
right ;)
so you understood ;)
from jimp.
That's great, guys. Thanks so much for this. I've pulled the solution in.
from jimp.
Related Issues (20)
- P3 Color Profile Support
- reading `png` throws `Uncaught Error: unrecognised content at end of stream` after `0.17.0` version
- Uncaught exception with malformed PNG HOT 2
- process image HOT 1
- Converted .BMP to .JPG has repeated edges
- unrecognised content at end of stream
- Suggest adding Otsu's threshold algorithm
- No matter what, "Mime must be a string"
- Error reading arraybuffer in production environment HOT 1
- Share some examples of how to use it.(Multi page tiff from multiple images)
- @jimp/png won't work with @jimp/custom
- .brightness() method does not affect brightness
- Upgrade dependancy version of xml2js HOT 1
- Save to specific width and height in inches HOT 1
- Jimp.decoders is undefined in browser with webpack and typescript
- ERR_PNPM_NO_MATCHING_VERSION No matching version found for @jimp/plugin-scale@^0.22.12
- zlib_bindings problem when used in Vite with Typescript
- Do anyone can run jimp in latest reactjs project? HOT 1
- Unable to get it working in a Vue project. HOT 3
- [BUG] Error when using ES Modules with Jimp HOT 6
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 jimp.