-
Notifications
You must be signed in to change notification settings - Fork 24
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
Cannot set e exact size #35
Comments
It's not really designed to work that way. Generally speaking when you're resizing images you either: So with that said, to output at a specific size, you're firstly at the mercy of the target smart object. If you want the output to have a square that is let's say exactly
If your input files don't have the same aspect ratio and you don't mind stretching them, batch resize (stretch) your input files before feeding them to the script. Another option is to use the option Pre-processing or not, when your input files are exactly the size of your target smart object you can use options
I may have to refresh my memory a bit at some point to make sure I didn't forget something. |
By the way, could you confirm if the script works? Yesteday I was told it doesn't, or at least that the standalone example didn't, even without changing anything: #34 (comment) |
The stretch option may solve my problem, but I don't know how to implement it. Visually, I have added the current resize and what I want below. Can you simply explain what I should do by writing what on which line? and the example works without any problems. I use the example with some modifications and it has no problems except for resizing. Thank you for your help and this excellent code. var output = { mockups([ // Mockup #1
},
},
},
},
},
},
}, ]); ` |
That's is never the right way to go about it. I would seriously urge you not to stretch (or actually in this case squish) the images... It's practically criminal to do that. If cropping is unacceptable, then so should be disregarding the aspect ratio. I would fix this issue by making sure the smart object is the same aspect ratio as these input files or if that is not viable make sure the input files are the same aspect ratio as the smart object, so no cropping or squishing needs to happen. Or perhaps you could use If you want to spit in the face of graphic design gods... And I sigh just thinking about it (depression growing deeper by the minute)... There are many ways / applications to bach resize images. Photoshop is not necessarily the simplest, because there are applications that pretty much do it with a single button press, but you can batch resize images in Photoshop quite easily. Resize all your input files to |
I didn't understand this "I think there's no way to stretch or squash the image"
I found you a Youtube tutorial and everything. |
I mean 'I think there's no way to stretch or squash the image' with this code. I use multiple mockups and the smart objects' sizes are different so if I resize my input files to 1170x836 its work for only one mockup. I Watched the tutorial, but this way I have to make bath resize for each mockup and create a different code file or edit it every time I use different mockup. |
Alright. I would make sure every input has the right aspect ratio, even if it means making multiple versions for multiple mockups. Or if that is too much work I would settle for |
I understood thank you. |
I cannot resize the photo to a certain size. For example, I want it to be 1170x836 px, but it does not work, so my photo is cut from the bottom and top. Is there any option or code for it ? Thank you.
The text was updated successfully, but these errors were encountered: