-
Notifications
You must be signed in to change notification settings - Fork 96
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
Crop mode does not work? #115
Comments
Hi, Please can you provide a configuration file? Thanks, |
Hi @andismith I am currently experiencing the same issue, however I am unsure if this is being caused by my grunt configuration, hopefully it is though. responsive_images: {
dev: {
options: {
engine: 'im',
sizes:[
{
width: 600,
height: 300,
suffix: '',
quality: 50,
gravity: 'center',
aspectRatio: false
}
//Files and stuff below The images are being resized no problem, but no cropping is taking place. |
@andismith Please see my pull request at #124 ? The code that checks for 'sample' function is wrongly done in an if-else. The default behavior 'resize' should have been specified much higher up, preferably at the start of that code block that parses user-specified task options. For this PR, I have done a quick fix. Do let me know if you want me to do some refactor to make the code "more correct". Thanks! |
Hi @andismith, I have also stumbled into this issue. In the documentation it is specified:
Why was this behavior chosen? What happens if we want to really change both the width and the height by not keeping the aspect ratio and without cropping (forced resize). So, another idea would be then to not mix these two concepts. In other words, maybe we should have a separate option for cropping and not implying it through aspectRatio=false and specified width and height? I could implement this if agreed. Appreciate your answer. Thanks, |
Hi @mburazin My PR #124 is really a stop-gap measure. Yes, I have also determined that there are problems with the test suites, which causes the correct code at #124 to fail. The error in the test suites is another issue altogether. It seems @andismith is too busy to check his test suites right now. Coming back to cropping with The main issue is that Whereas ImageMagick sets and changes its command syntax at its own whims, GraphicsMagick tried to faithfully adhere to ImageMagick's conventions, until it became impossible because ImageMagick deviated from its own conventions. That said, I had planned to rewrite Meantime, please get in touch with Udacity about this glaring bug with |
Hi @jon-wong-sutd, Thanks a bunch for the elaboration and sharing your experiences. I will let Udacity know about this bug. In the meantime I can use But, just to ask, are you saying that this project ( I see that it hasn't been updated lately. Thanks again! |
Hi @mburazin Command-Line Interface is Complete
You can try ImageMagick or GraphicsMagick. For the "art direction" you need in your project, both are a lot more than adequate and convenient. Here's a challenge: I suggest you use ImageMagick, since I used GraphicsMagick. The GraphicsMagick docs (esp. note command Both ImageMagick's and GraphicsMagick's full power can be accessed via command-line, so using Serve More Laymen, or Serve Yourself?
Since If you wanna serve more Udacity students, who would prefer The key addition is ordered list of processing command. It will entail a huge rewrite of this project. Hence, it is nigh impossible to merely correct and maintain this project. Both tools allow an ordered (sequential) composition of multiple commands. For eg, you may first want to crop an image to an area somewhere top-right, and then rotate the result, and lastly scale the result. (You'll see that rotating first will hinder the crop operation.) Currently, Also, here's a heads up: plain cropping in So yeah, Grunt or Gulp?The question also boils down to Some possibly boring details about convention vs flexibility. In
In In short, |
The image gets resized instead. Using ImageMagick.
Both width and height are set.
aspectRatio
is set tofalse
.The text was updated successfully, but these errors were encountered: