Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Image size 3024x4032 #736

Closed
RobertCalamari opened this issue May 14, 2019 · 2 comments · Fixed by #791
Closed

Issue with Image size 3024x4032 #736

RobertCalamari opened this issue May 14, 2019 · 2 comments · Fixed by #791

Comments

@RobertCalamari
Copy link

RobertCalamari commented May 14, 2019

Expected Behavior

I am just trying to take an image from one folder and move it to another folder.

Current Behavior

However, I am having an issue with images that are size 3024x4032. When my code is ran and I check for the width and the height, it looks as if they switched. Code is below.

Steps to Reproduce

The code takes 5 images named "pics (n).jpg" and moves them to a new folder.

function runchanger(num, callback){
if(num == 0){
console.log("DONE");
}
else{
var filetoget = './client/img/imgprcss/tochange/pics (' + num + ').jpg';
var filechanged = './client/img/imgprcss/changed/keeping (' + num + ').jpg';

     Jimp.read(filetoget, (err, image) => {
          if (err) throw err;
          console.log(num + " - were her changing the image - width:" + image.bitmap.width + " | height: " + image.bitmap.height);
            image.write(filechanged);
            callback(num-1, runchanger);
    });     
    
}

}

runchanger(5, runchanger);

IF YOUR ISSUE DEPENDS ON A PARTICULAR IMAGE BE SURE TO INCLUDE THIS AS WELL. WE CAN'T REPORDUCE IF WE DON'T HAVE YOUR IMAGE

Images are attached. I included some that are fine to show that not all of them are effected.
Here are the images before processing:
pics (396)
pics (394)
pics (395)
pics (399)
pics (400)

Here are the images after:
keeping (395)
keeping (396)
keeping (399)
keeping (400)

Context

Running the code through node.js

  • Jimp Version: 0.6.4
  • Operating System: Windows 10
  • Node version: v8.12.0
@RobertCalamari
Copy link
Author

I notice here that when I posted the files in here they are sideways which would make sense why it is saying that the width is longer. However this seems odd since the images in the windows explorer are vertical:
Images before processing. I made the middle photo horizontal to see if that would change it:
image

Images after processing:
image

What is confusing is that when you look at the properties of the image, the height and width change when I rotate it.
image

@mkondel
Copy link

mkondel commented May 20, 2019

This is the same as my issue #733. The problem is that some images have their rotation set in the EXIF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants