Git Product home page Git Product logo

Comments (12)

oliver-moran avatar oliver-moran commented on August 19, 2024

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.

yoyoy avatar yoyoy commented on August 19, 2024

yep
you can try this image
http://dropcanvas.com/7vbtj
for now no matter with other images...

from jimp.

yoyoy avatar yoyoy commented on August 19, 2024

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.

yoyoy avatar yoyoy commented on August 19, 2024

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.

yoyoy avatar yoyoy commented on August 19, 2024

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.

charafsalmi avatar charafsalmi commented on August 19, 2024

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();
          })
        });

dinar_n_dirham_3
dinar_n_dirham_3

from jimp.

yoyoy avatar yoyoy commented on August 19, 2024

hi @charafsalmi
did you know another library to do that without installing imagemagik or other external tool ?
thanks

from jimp.

yoyoy avatar yoyoy commented on August 19, 2024

hi !
i've found the (fu****g) solution ...
just Math.round your size ....
no comment :'(

from jimp.

charafsalmi avatar charafsalmi commented on August 19, 2024

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.

charafsalmi avatar charafsalmi commented on August 19, 2024

i've did a pull request for this =)
#4

from jimp.

yoyoy avatar yoyoy commented on August 19, 2024

right ;)
so you understood ;)

from jimp.

oliver-moran avatar oliver-moran commented on August 19, 2024

That's great, guys. Thanks so much for this. I've pulled the solution in.

from jimp.

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.