• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
image_lib improvement: keep resource for several actions (better quality)

#1
Hello. (Spanish native speaker; sorry about my english)

I've been involved in a project where i should put many words on a background image. Also, sometimes it has to be saved to a file on server and someother it was created on the fly and returned (no saving on server).

So i had to make a modification on image_lib library to keep the resource between different text_watermark method invokes; added a property option for the flag and a private property for the image resource. Also a method to get that resource. And finally modified the text_whatermark method so it could take -at the beggining- the resource if flag and resource were set, and returning true without destroying it before leaving.

That make me achive two goals:
-improve result image quality
-being able no to save unnecesary files

Maybe this kind of improvement can be applied for the others methods (overlay_watermark, crop, resize...).

Hope it could be considered for future versions.

Omar


Attached Files
.php   Image_lib.php (Size: 44.52 KB / Downloads: 39)
Reply

#2
You should never modify a CodeIgniter System file!

You extend the libraries and add what's needed.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#3
(11-23-2018, 05:52 AM)InsiteFX Wrote: You should never modify a CodeIgniter System file!

You extend the libraries and add what's needed.

Yes... i should never do it... but i was in a rush, and also i'm suggesting an -intresting?- improvment on the library, for implementing many watermarks keeping image resource instead of saving each time (and loosing quality).

Cheers
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.