News for hackers. Stuff that matters.
Re:Grafika – An image processing library for PHP by vatotemking on Monday July 25, 2016 @09:18AM (#12158452)
Kinda discouraging that everytime I post this lib I am always asked: "there is already imagine, imageXX etc lib out there. why another lib?" I feel like I violated some code of honor or something.

Just to be clear, here's why I made it:

- it aims to be an image processing lib. Not a an image manipulation lib which is just a small subset of image processing. Big difference. Also I fell in love with image processing. :-)

- Smart crop. Not present in other libs. I am surprised that in PHP cropping an image is a fairly common requirement. Yet none of the existing libs have it. I found one from an obscure drupal extension.

- Image compare. Not present in other libs. Fairly important and needed feature esp for CMS yet none existed.

- Advance filters. The default ones provided by GD and Imagick (not ImageMagick) are very basic filters. Right now only Sobel filter is implemented, more will be added in the future.

- Bezier Curves. Imagick is good but GD does not have it so I implemented a bezier curve algorithm manually porting it from a c++ code.

The future

- Seam carving

- More edge filters

- Full anti-aliased shapes and curves in GD. GD does not support anti-aliasing on all its shapes.

- Perhaps face detection but we'll see..

I think this is a worthy library to check out. Might not be for everyone though..

Re:Grafika – An image processing library for PHP by CiPHPerCoder on Monday July 25, 2016 @12:01PM (#12159538)
> Kinda discouraging that everytime I post this lib I am always asked: "there is already imagine, imageXX etc lib out there. why another lib?" I feel like I violated some code of honor or something.

Y'know how people say, "Don't reinvent the wheel?" The emphasis should be on the.

Don't reinvent THE wheel.

Feel free to invent a better wheel.

Better here can mean simpler, which allows users to be more productive. As far as I can tell, you've accomplished this much. So, good job, and thanks for sharing.

Re:Grafika – An image processing library for PHP by tangue on Monday July 25, 2016 @09:33AM (#12158540)
It's a classic but let's quote Jeff Wood : * Indeed. If anything, "Don't Reinvent The Wheel" should be used as a call to arms for deeply educating yourself about all the existing solutions – not as a bludgeoning tool to undermine those who legitimately want to build something better or improve on what's already out there. In my experience, sadly, it's much more the latter than the former.*

https://blog.codinghorror.com/dont-reinvent-the-wheel-unless...

Re:Grafika – An image processing library for PHP by reitanqild on Monday July 25, 2016 @09:38AM (#12158571)
Furthermore we should be happy that the wheel has been reinvented a number of times, the first ones where fairly clunky.

-Unknown

Re:Grafika – An image processing library for PHP by jlg23 on Monday July 25, 2016 @10:33AM (#12158944)
If you keep getting asked the same question, why not put this list of reasons on the lib's homepage? What you have on the page now is not convincing (I'd just create a function for your first example and I don't care about the syntax you show off in the second example) - but the points you made here are good selling points!
Re:Grafika – An image processing library for PHP by pierrej on Monday July 25, 2016 @01:02PM (#12159981)
Haters gonna hate.

There are a lot of room for new libs. Gfx needs are infinite. No single library can cover all needs fitting everyone requirements.

Interop between each is the key. And competion leads to success.

Stay tuned with gd 2.3 btw from a (much better aa pov along other things:)

Re:Grafika – An image processing library for PHP by vatotemking on Monday July 25, 2016 @04:29PM (#12161393)
Hey are you the Pierre Joye of libgd?? Thank you for all the hard work.
Re:Grafika – An image processing library for PHP by pierrej on Monday July 25, 2016 @11:36PM (#12163176)
Yes, my pleasure. Happy you like it :)
Re:Grafika – An image processing library for PHP by vatotemking on Wednesday July 27, 2016 @09:34AM (#12172582)
Btw, what is the process in contributing to libgd? I'd like to contribute.
Re:Grafika – An image processing library for PHP by Jemaclus on Monday July 25, 2016 @02:38PM (#12160613)
Don't listen to the haters. :)

One thing I'm interested in is blurring. Blurring seems to be pretty CPU intensive, but I'm hoping there's a better way to do it. Right now, I'm using Intervention Image, but I routinely have to blur photos which can take upwards of 2-3s per image (especially for larger ones). Maybe that's something you could tackle? :)

Re:Grafika – An image processing library for PHP by oofoe on Monday July 25, 2016 @11:14AM (#12159218)
For what it's worth, just being able to chain the calls makes this worthwhile. Thanks for making the effort and taking the time to release it!
Re:Grafika – An image processing library for PHP by dubcanada on Monday July 25, 2016 @12:08PM (#12159595)
I know your reasoning is I should make a new library because X and Y don't exist in the existing ones. But really what most people think of is why not just send a pull request to the existing ones with that new functionality?
Re:Grafika – An image processing library for PHP by lohengramm on Monday July 25, 2016 @01:56PM (#12160338)
Maybe he just wants to build his own thing, or he doesn't like the code from the existing ones, or he doesn't want to commit to learn and write the code just to have his PR ignored or rejected, or he doesn't want to wait until someone notices his work and decides to ship it into the next version.
Re:Grafika – An image processing library for PHP by pierrej on Monday July 25, 2016 @01:07PM (#12160005)
Side notes you may update your comparisons using latest GD. imagescale, rotate or affine, which do what you said about 15yo copyresampled
Re:Grafika – An image processing library for PHP by mitchellmckenna on Monday July 25, 2016 @03:01PM (#12160769)
I think it would be helpful to include this information on the project website.