-
Notifications
You must be signed in to change notification settings - Fork 166
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
applying "resize" filter #57
Comments
no one? |
You should create your own custom filter for that functionality, it should be easy to do so by looking at the thumbnail filter loader and configuration the bundle comes with, let me know if you're having hard time understanding how to use filter loaders. @jmikola wanna chime in and point out filter loader and custom filter examples, I know you did something similar |
I saw from the source that only |
Sorry for just arriving to the conversation. @inmarelibero, I'm not sure if you still need help, but I think this is what Bulat was suggesting you use for reference: https://github.com/jmikola/JmikolaImagineBundle I implemented a custom filter there for resizing with Imagine's |
@jmikola I like the resize filter, would you be interested in adding that to this bundle? along with docs? |
closing the issue |
Sorry, I didn't check GitHub for the past two days. I will assign this to myself and work on a PR. IIRC, the only reason I created JmikolaImagineBundle is because we wanted to encourage people to create their own filters instead of relying on this bundle being bloated :) |
thanks Jeremy! |
@jmikola ping, any progress on this? :) |
great, thank you! |
Add file transformers to the file loader
I am confused. so does relative resize only resize down , not up ? |
It's been more than a while since I looked at this, but relative resizing shouldn't care about the original size of the image. It simply guarantees that the aspect ratio is preserved. The documentation examples in https://github.com/jmikola/JmikolaImagineBundle#relativeresize (my old bundle) should explain how this works. |
Thanks. I am still a little surprised that small images might be enlarged (blurred) by the resize. I was looking at a way to have bigger images rezied to a max size, with smaller images left untouched. I'll take a deeper look at the code to see how to go about that. |
Let's put I want a 200x200 thumbnail starting from an image. So I set the
config.yml
in this way:and everything works well with images bigger than 200x200, because it will resize the original image depending on the max dimension: height or width.
The problem raises when the original image is smaller than 200x200, e.g. 50x50. In this case the image is stretched, until at least one dimension reaches 200. I want that smaller images than 200x200 are not resized at all.
So I tried in
config.yml
:looking at
Imagine
documentation page found here: http://imagine.readthedocs.org/en/latest/api/Image/manipulator_interface.html#Imagine\Image\ManipulatorInterface::flipHorizontallyfrom that document, I understand I can use
resize
filter withsize
option, in the same way I can usethumbnail
filter withsize
andmode
options.But this does not work, the thumbnail is not created at all. Anyone already tried to do this? Any suggestions? thanks
The text was updated successfully, but these errors were encountered: