You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Here are the images after:
Context
Running the code through node.js
Jimp Version: 0.6.4
Operating System: Windows 10
Node version: v8.12.0
The text was updated successfully, but these errors were encountered:
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:
Images after processing:
What is confusing is that when you look at the properties of the image, the height and width change when I rotate it.
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';
}
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:
Here are the images after:
Context
Running the code through node.js
The text was updated successfully, but these errors were encountered: