CImageHelper write #2013

Open
adminnu opened this Issue Jan 19, 2013 · 8 comments

Projects

None yet

3 participants

@adminnu
Contributor
adminnu commented Jan 19, 2013

It would be nice to add this helper, it and resize and crop images, display images, and more.
It would be convenient for end users and for yii, such as CAPTCHAs.
If it is convenient, I can write.
Here is a helper frameworks:

@Ragazzo
Ragazzo commented Jan 19, 2013

Hm i think that there are plenty of extensions that can satisfy users, and extensions are more powerful than helper. no offence ofcourse )

@adminnu
Contributor
adminnu commented Jan 19, 2013

Well see there is a capture, it is also possible to make additions, but we have this class. And a native class, and not an addition is much steeper than for the same captcha would have it more convenient than having a separate function to display the captcha and function of complement. So what, if I do accept the pull if all it will be ok? Or not? And then these supplements can replace many of the way loaded methods, methods of this helper, sending its power to even bigger things.
Just if there are other fremvork assistants, it would be nice to have both of us.
And in terms of additions can even consider such a situation, there is a jquery which implements many of the functional and as soon as something appears in the browsers themselves, it helps simplify jquery based on the capabilities of the browser.

Plus, if I do module loading images and their subsequent processing and output, I would be safer to use a native class to handle, as it will be supported to develop and I can direct their energies to more important things to work out the model, controllers, loading methods and work with the base. Incidentally downloading files is also very poorly implemented in yii, which is a very important thing in any fremvork as they are encountered in almost any project.

CPasswordHelper class is so wonderful it would be, and now he is, though functional duplicates many additions, but believe everything everyone wrote themselves and are now happy to overwrite the methods of this class.

@adminnu adminnu closed this Jan 19, 2013
@Ragazzo
Ragazzo commented Jan 19, 2013

Pochemu zakril?

@adminnu adminnu reopened this Jan 19, 2013
@adminnu
Contributor
adminnu commented Jan 19, 2013

Well, I think, if so, will open. Incidentally found in extensions, found only one class, converted from Kohana http://kohanaframework.org/3.0/guide/api/Image, but it is weaker than CI.

@Ragazzo
Ragazzo commented Jan 19, 2013

Yes, dont close this one until core-developers will say their decision)

@suralc
Contributor
suralc commented Jan 19, 2013

@adminnu I think the motivation to create CPasswordHelper was to backport the new Password-API introduced in PHP 5.5, not to render user made extensions obsolete:

http://php.net/manual/en/book.password.php
https://wiki.php.net/rfc/password_hash

With the pull into the PHP core this could be seen as a standart. GD and Imagick could be seen as equivalents, however wrapping them into the yii core does not add any beneficial functionality(and would be complicated to maintain). There are many good libraries and extensions adding this functionality. Also passwords interact on a deeper level with the core functionality of the framework, IMHO.

Nothing stops you to wrap any library to a component or just use it directly.

E.g.:
https://github.com/avalanche123/Imagine

However this is just my oppinion on this(which doensn't matter too much as I haven't done much for yii lately).

@suralc
Contributor
suralc commented Jan 19, 2013

@adminnu True..

Thought it would be a zii widget (It is still an optional requirement). However usage is scoped to a specific scenario, a CImageHelper would be general. And I still don't see the general benefit over a usermade extension, which does not mean that I would stop using yii if someone is willing to create and maintain it (and it's accepted by the core-devs).

Still, a unified interface(GD and Imagick) would be neccessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment