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

Move helper/image out of legacy namespace #1618

Closed
aembler opened this issue Dec 6, 2014 · 5 comments
Closed

Move helper/image out of legacy namespace #1618

aembler opened this issue Dec 6, 2014 · 5 comments
Assignees

Comments

@aembler
Copy link
Member

aembler commented Dec 6, 2014

  • Clean up the API a bit, rename getThumbnail(), etc... but this is a useful function and it probably shouldn't be deprecated
@aembler aembler self-assigned this Dec 6, 2014
@aembler aembler added this to the 5.7.4 milestone Dec 6, 2014
@goutnet
Copy link

goutnet commented Dec 27, 2014

Could you describe a bit what you intend to do here, I might actually go ahead and do it myself (some of my addons require this helper to work properly).

@aembler
Copy link
Member Author

aembler commented Dec 30, 2014

I'm thinking this is a specific issue based on some of the discussion we've been having here #1152. In short

a. In 5.6, we had some very basic file storage location functionality
b. In 5.6, we had a very limited way of programmatically cropping images and saving them into the file system.
c. In 5.7, we don't really have any support for saving these programmatic images into one of these file storage locations. That's why I kept the image helper but named it legacy – because it didn't really play nicely with all of the new functionality in 5.7.
d. In 5.7, we have a much fuller featured method of programmatically cropping and modifying images – the Imagine library, a third party library that we use throughout the core (mostly in the file version thumbnailing stuff.)

What we don't have in 5.7 is a nice API to go from having an image as a file object, and easily creating an on-demand, cropped thumbnail from it. You have to get the path to the image, decode it into a stream, load it into imagine, use all of Imagine's somewhat tedious OOP approach, etc... It's just not as convenient. That's why we've been talking about bringing back the legacy image helper – because even if it doesn't store the image in file storage locations perfectly or offer all the functionality that we might want, it is convenient.

That's where I think we were thinking.

@MrKarlDilkington
Copy link
Contributor

I use helper/image all the time because of its ease of use and on demand cropping.

+1 for removing it from legacy

@a3020
Copy link
Contributor

a3020 commented Oct 2, 2015

Although the BasicThumbnailer class is now out of the 'legacy namespace', the functions in it are still marked as 'deprecated'. What are you thoughts on that?

@aembler
Copy link
Member Author

aembler commented Oct 2, 2015

Yeah they should no longer be marked as deprecated

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

No branches or pull requests

4 participants