Codeigniter Image Manupulation Example
7th Oct 2011 at 9:31 AM | Posted in PHP | 49 CommentsCreate a folder “uploaded” where your “application” folder is. (Not inside “application” folder”). Create a sub folder “thumbs” inside “uploaded”. Put a font in system/fonts/arial.ttf (copy the font from your windows).
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Imagetest extends CI_Controller { function __construct() { parent::__construct(); $this->load->helper('url'); } function index() { $path = realpath(APPPATH . '../uploaded'); $file = "asd.jpg"; $path = str_replace('\\','/',$path); $config = array( 'source_image' => $path.'/'.$file, 'new_image' => $path.'/thumbs/'.$file, 'maintain_ration' => true, 'width' => 150, 'height' => 100, 'x_axis' => '100', 'y_axis' => '40', 'rotation_angle' => '180', 'wm_text' => 'Test asdfsda sa dsa dsa dsa a', 'wm_type' => 'text', 'wm_font_path' => 'system/fonts/arial.ttf', 'wm_font_size' => '30', 'wm_font_color' => 'FF0000', 'wm_vrt_alignment' => 'bottom', 'wm_hor_alignment' => 'center', 'wm_padding' => '10' ); print "<pre>"; print_r($config); $this->load->library('image_lib', $config); //$this->image_lib->crop(); //$this->image_lib->clear(); $this->image_lib->resize(); /*$this->image_lib->rotate(); $this->image_lib->clear(); if(!$this->image_lib->watermark()) { echo $this->image_lib->display_errors(); } */ $this->load->view('imagetest'); } }
49 Comments »
RSS feed for comments on this post. TrackBack URI
Leave a reply to aizdevumi internetā Cancel reply
Create a free website or blog at WordPress.com.
Entries and comments feeds.
clemency…
[…]in the following are a couple of links to places which I link to because we believe they really are well worth visiting[…]…
Trackback by Red Bottom Shoes— 9th Nov 2011 #
Related.. Trackback…
[…]the time to read or visit the content or sites we have linked to below the[…]…
Trackback by Prestashop Templates— 11th Nov 2011 #
Hello Web Admin, I noticed that your On-Page SEO is not that great, for one you do not use all three H tags in your post, also I notice that you are not using bold or italics properly in your SEO optimization. On-Page SEO means more now than ever since the new Google update: Panda. No longer are backlinks and simply pinging or sending out a RSS feed the key to getting Google PageRank or Alexa Rankings, You now NEED On-Page SEO. So what is good On-Page SEO?First your keyword must appear in the title.Then it must appear in the URL.You have to optimize your keyword and make sure that it has a nice keyword density of 3-5% in your article with relevant LSI (Latent Semantic Indexing). Then you should spread all H1,H2,H3 tags in your article.Your Keyword should appear in your first paragraph and in the last sentence of the page. You should have relevant usage of Bold and italics of your keyword.There should be one internal link to a page on your blog and you should have one image with an alt tag that has your keyword….wait there’s even more Now what if i told you there was a simple WordPress plugin that does all the On-Page SEO, and automatically for you? That’s right AUTOMATICALLY, just watch this 4minute video for more information at. WordPress Seo Plugin
Comment by Isidro Zecchini— 12th Nov 2011 #
Recommended Resources…
[…]the time to read or visit the content or sites we have linked to below the[…]…
Trackback by Buy Guaranteed Facebook Fans— 21st Nov 2011 #
I never imagined how much stuff there was on this! Thanks for making this simple to
figure out
Comment by cheap monthly seo plan— 19th Dec 2012 #
I am really impressed with your writing skills
and also with the layout on your blog. Is this
a paid theme or did you customize it yourself?
Either way keep up the nice quality writing, it is rare to
see a great blog like this one nowadays.
Comment by Juegos Online— 18th Jan 2013 #
First of all I would like to say fantastic blog!
I had a quick question that I’d like to ask if you don’t mind.
I was curious to find out how you center yourself and clear your mind before writing.
I’ve had difficulty clearing my mind in getting my thoughts out. I truly do take pleasure in writing however it just seems like the first 10 to 15 minutes are lost simply just trying to figure out how to begin. Any ideas or hints? Appreciate it!
Comment by AIR JORDAN— 3rd Apr 2013 #
I’m amazed, I must say. Seldom do I come across a blog that’s both educative and interesting, and let me tell you,
you have hit the nail on the head. The issue is an issue that not enough people are speaking intelligently about.
I’m very happy that I found this in my hunt for something concerning this.
Comment by conseil en referencement— 5th Aug 2013 #
Wow, amazing blog structure! How long have you
ever been blogging for? you made running a blog glance easy.
The whole glance of your web site is magnificent, as well as the content!
Comment by tee shirts— 11th Aug 2013 #
Hi to all, how is the whole thing, I think every one is getting more from this site, and your views are nice designed for new visitors.
Comment by automated seo software— 26th Jan 2014 #
I knoա this if ߋff toƿic but I’m looking into starting my own weblog and
was wondering what all is required to get set up? I’m assuming having a
blog like yours would cost a pretty penny? I’m not very
internet smart so I’m not 100% positive. Αny tips
oг advice would be greatly appreciated. Kudos
Comment by Ford ranger Forum— 10th Jun 2014 #
This is always a fact there is no lack in the amount of companies
offering business process outsourcing Philippines services.
The assess is enhanced employing the might of the portable handset indicator to assess
how close to the cell place the portable invention is.
Twitter is the best prime example, especially for companies like restaurants and bars.
Comment by Travis— 10th Jun 2014 #
Quality articles is the crucial to attract the people to go to see
the website, that’s what this website is providing.
Comment by emergency storm damage repair services Charlotte North Carolinas— 11th Jun 2014 #
You really make it seem so easy with your presentation but I find this matter
to be actually something that I think I would never
understand. It seems too complex and very broad for me.
I’m looking forward for your next post, I will try to get the hang of it!
Comment by how to stop anxiety attacks at school— 12th Jun 2014 #
My partner and I absolutely love your blog and find many of your post’s to be what precisely
I’m looking for. Do you offer guest writers to write content in your case?
I wouldn’t mind producing a post or elaborating on a number of the subjects you write concerning here.
Again, awesome weblog!
Comment by cartier love ring— 13th Jun 2014 #
It’s amazing for me to have a web page, which is valuable in favor of my knowledge.
thanks admin
Comment by ilocos hotel rates— 13th Jun 2014 #
Terrific work! That is the kind of info that are meant to be shared around the internet.
Disgrace on the search engines for no longer positioning this publish
higher! Come on over and consult with my site . Thanks =)
Comment by jailbreak iphone 5 ios 7.1.1— 13th Jun 2014 #
Fantastic blog you have here but I was wondering
if you knew of any user discussion forums that cover the same topics
discussed in this article? I’d really like to be a part
of group where I can get feed-back from other experienced people that share the same interest.
If you have any recommendations, please let me know. Kudos!
Comment by zz.diena.lv— 14th Jun 2014 #
My spouse and I absolutely love your blog and find nearly all of your post’s to be precisely what I’m looking for.
Would you offer guest writers to write content for yourself?
I wouldn’t mind writing a post or elaborating on some of the subjects you write concerning here.
Again, awesome web site!
Comment by แทงบอล— 14th Jun 2014 #
Yes! Finally someone writes about chairs.
Comment by www.sexfree.com.br— 14th Jun 2014 #
Greetings! Very helpful advice in this particular article!
It is the little changes that make the biggest changes.
Thanks a lot for sharing!
Comment by ebooks— 15th Jun 2014 #
I just like the valuable information you provide
on your articles. I will bookmark your blog and take a look at once more right here regularly.
I am moderately certain I’ll learn plenty of new stuff right right here!
Good luck for the next!
Comment by spinning bike— 15th Jun 2014 #
I’m not that much of a internet reader to be honest but your
sites really nice, keep it up! I’ll go ahead and bookmark your site to
come back in the future. All the best
Comment by mobi— 15th Jun 2014 #
I’m cuгious to find out what blog system you are using?
I’m having some small ѕecurity iѕsues with my latest websitе and I woսld like to fіnd something more safeguarded.
Do you have any suggestions?
Comment by Site— 15th Jun 2014 #
Hmm is anyone else experiencing problems with
the images on this blog loading? I’m trying to determine if its a problem on my end or if it’s the
blog. Any responses would be greatly appreciated.
Comment by aizdevumi internetā— 16th Jun 2014 #
Write more, thats all I have to say. Literally, it seems as though you
relied on the video to make your point. You clearly know what youre talking
about, why throw away your intelligence on just posting
videos to your weblog when you could be giving us something enlightening to read?
Comment by ทีเด็ดบอลวันนี้— 17th Jun 2014 #
I think the admin of this site is really working hard in favor of his web site, since here
every material is quality based information.
Comment by mokila— 17th Jun 2014 #
TҺey normally get ߋn the net and jump at the first
article of costlу еquipment they identify that promises all of the amazing
features, but whеn they ɡet it, they have no notion the
wɑy to use it. ” These are listed alphabetically so they are easy to find. Here you have a list of all the instruments already included with the program, to which you can add loops, more instruments and so on.
Comment by sonic producer sounds free download— 17th Jun 2014 #
Hello! Would you mind if I share your blog with my myspace group?
There’s a lot of people that I think would really enjoy
your content. Please let me know. Cheers
Comment by Karla— 17th Jun 2014 #
Not a problem. Go ahead.
Comment by souravkumarpaul— 24th Jun 2014 #
Hello! This is my first visit to your blog!
We are a team of volunteers and starting a new initiative in a community in the same niche.
Your blog provided us beneficial information to work on. You have done a extraordinary job!
Comment by atlanta property management— 18th Jun 2014 #
Hello! I could have sworn I’ve been to this site before but
after browsing through some of the post I realized it’s new to me.
Nonetheless, I’m definitely happy I found it and I’ll be book-marking and checking back often!
Comment by lowongan kerja— 18th Jun 2014 #
Ρlease let me know if you’re looking for a aгticle writer for
your blog. You have some really good posts and I feel I would be a good asset.
If you ever want to take some of the loaԁ off, I’d
гeɑlly like to wгite some articles fօr your blog in exchange fօr a
link back to mіne. Please shoot me an email if interested.
Thank you!
Comment by webpage— 18th Jun 2014 #
You have numеrous alternatives in relatіon to setting up ƴour aquarium.
When he sees bugs, he stops and has snapped at
them on occasion. ӏn the shades is the best option, the habitat can not be warmer than 35 degrees
in the shade.
Comment by bearded dragon secret manual free— 19th Jun 2014 #
After you fixed the problems with your website, submit Reconsideration Request to Google so your website will be re-evaluated.
Frequent updates are perhaps the foundation of search motor optimization. On authors are just inventing something which sounded great.
Comment by luhless.com— 20th Jun 2014 #
Hi there! Someone in my Facebook group shared
this site with us so I came to look it over. I’m definitely loving the information. I’m bookmarking and will be tweeting this to my followers!
Superb blog and superb style and design.
Comment by cheatclashofclan.com— 23rd Jun 2014 #
Right here is the right blog for anybody who wants to find
out about this topic. You know so much its almost hard to argue with you (not that I personally would want toHaHa).
You certainly put a new spin on a subject that’s been discussed for many years.
Great stuff, just wonderful!
Comment by @— 24th Jun 2014 #
It’s wonderful that you are getting thoughts from this paragraph as well as from our discussion made here.
Comment by Karine— 24th Jun 2014 #
Ӏt’s a shame you don’t have a donatе button! I’d most ceгtainly donate to this excellent blog!
I guess for now і’ll settle for book-marking and adding your
ɌSS feed to my Gߋogle account. I loоk forward to fresh updаtes and
will talk about thіs site with my Facebook group.
Talk soon!
Comment by kids soccer information— 24th Jun 2014 #
This post is truly a nice one it helps new web visitors, who are wishing in favor of blogging.
Comment by file— 24th Jun 2014 #
My relatives always say that I am wasting my time here at net, however I know
I am getting knowledge daily by reading such good content.
Comment by visit website— 24th Jun 2014 #
Way cool! Some very valid points! I appreciate you writing this write-up and
also the rest of the website is extremely good.
Comment by @— 24th Jun 2014 #
wonderful issues altogether, you just won a new reader.
What may you recommend in regards to your put up that you made some days ago?
Any positive?
Comment by Cruising World Calendar pdf— 24th Jun 2014 #
Whoa! This blog looks just like my old one!
It’s on a totally different topic but it has pretty much the same page layout and design. Superb choice of colors!
Comment by Erin— 25th Jun 2014 #
Don’t hesitate to find a good lawyer because you feel that the situation is not that serious.
Depending on how long you have been employed, the penalty amount can be substantial.
The safety of other people is in your lap, so
make the right choice.
Comment by Cristine— 16th Jul 2014 #
Hello fantastic website! Does running a blog similar to this require a massive
amount work? I’ve very little understanding of
computer programming but I had been hoping to start my own blog in the near future.
Anyways, should you have any recommendations or techniques for new blog owners please share.
I know this is off topic nevertheless I simply needed to ask.
Thank you!
Comment by Grandville Jewelry— 24th Sep 2014 #
Carmen Cortez is a specialist advisor of every type
of business loan and currently working as financial consultant in Bad Credit Loans Information. These genuine occults always bring you right guidance to your right answers and
right circumstances. All major manufacturer and retail online websites typically
will offer a secure sign for your credit card purchases.
Comment by vivus— 5th Sep 2015 #
Remarkable! Its genuinely awesome post, I have got much clear idea concerning from this article.
Comment by the phone bulletin— 27th Nov 2015 #
I really like what you guys are up too. This sort of
clever work and exposure! Keep up the very good works guys I’ve you guys to our blogroll.
Comment by online— 5th Jun 2016 #