About image mirroring using php

Reply

Join Date: Sep 2006
Posts: 53
Reputation: mahe4us is an unknown quantity at this point 
Solved Threads: 0
mahe4us's Avatar
mahe4us mahe4us is offline Offline
Junior Poster in Training

About image mirroring using php

 
0
  #1
Dec 16th, 2006
Hi to all,

I would like to give a feature for users while they are uploading their pictures. Suppose if the user uploaded a picture, then the user has facility to change the uploaded picture into horizontal mirroring and vertical mirroring. Once the user changed the image to his wishes then the image would be saved into server.

Kindly anyone suggest me how to mirroring the image using php in serverside.

Thanku in advance.
Reply With Quote Quick reply to this message  
Join Date: Sep 2005
Posts: 1,073
Reputation: digital-ether is just really nice digital-ether is just really nice digital-ether is just really nice digital-ether is just really nice 
Solved Threads: 66
Moderator
digital-ether's Avatar
digital-ether digital-ether is offline Offline
Veteran Poster

Re: About image mirroring using php

 
0
  #2
Dec 18th, 2006
HI mahe4us,

Are you using GD or Imagemagick?

With Imagemagick you can use the -flip option to get the mirror image. heres an article on imagemagick for php: http://www.sitepoint.com/article/dyn...es-imagemagick

If you're using GD, unfortunately there is no function to get the mirror image using GD functions in PHP.
The only way I can think of is to:

1) Get each color of the image pixels (using: imagecolorat() function. http://www.php.net/manual/en/function.imagecolorat.php)
2) Place all the colors of the pixels in a corresponding Array.
3) Manipulate the Array using the Array functions. http://www.php.net/array. (eg: To get the mirror image along the right side of the image, then reverse all array values from left to right.)
4) Create the mirror image from the manipulated array of colors by drawing each pixel. (http://www.php.net/manual/en/function.imagesetpixel.php)

It would probably won't be the most efficient solution..
www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 53
Reputation: mahe4us is an unknown quantity at this point 
Solved Threads: 0
mahe4us's Avatar
mahe4us mahe4us is offline Offline
Junior Poster in Training

Re: About image mirroring using php

 
0
  #3
Dec 21st, 2006
Hi Digital-Ether,

Glad to meet you once again with my query. I gothrough the sites given by you . It is very effective. Apart from that, somebody told me to mirroring,cropping,rotating the images via OCR programs. That means OCR programs are written in VC++ . Inputs are given through php and the processing are held in vc++ in the server and the return result are get output at php pages.

image rendering
images
PHP -------->VC++(OCR PROGRAMS)---------> output at brower(PHP)

This is the concept i want to tell you. Have you any idea about this.....
Is this possible ????

I expecting your reply........
Reply With Quote Quick reply to this message  
Join Date: Sep 2005
Posts: 1,073
Reputation: digital-ether is just really nice digital-ether is just really nice digital-ether is just really nice digital-ether is just really nice 
Solved Threads: 66
Moderator
digital-ether's Avatar
digital-ether digital-ether is offline Offline
Veteran Poster

Re: About image mirroring using php

 
0
  #4
Dec 22nd, 2006
Its seems that OCR (Optical Character Recognition) programs are designed specifically for recognizing text/characters in Image files, not transforming images.

I would think that the GD lib (written in C++ also) or Imagemagick would be more suited for manipulating images than an OCR program since its designed specifically for manipulating images. They are easier to use since PHP extensions have been developed for both.

If the OCR program has the mirror image function however, it may be the better one to use. who knows..

If you go with using an OCR then, you'd have to install the OCR program on your server however.
I think you can then access it via PHP by executing commands through the system() or exec() function or one of the like.
www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 53
Reputation: mahe4us is an unknown quantity at this point 
Solved Threads: 0
mahe4us's Avatar
mahe4us mahe4us is offline Offline
Junior Poster in Training

Re: About image mirroring using php

 
0
  #5
Dec 23rd, 2006
Hi Digital-Ether,

Thankyou for your kind reply. I have realised that imagemagick is better than OCR programs and it is easy to manipulate images in a better way. I have some doubts regarding imagemagick php extensions. I have succesfully installed imagemagick in my windows system. Now iam trying to install magickwand for php. But it has some difficulty to install.

Please gothrough the below URL...
http://www.imagemagick.org/discourse...hlight=install

In the above URL they explained how to install imagemagick and magickwand for php. I have understood imagemagick installation but magickwand is somewhat difficult. If you have get any ideas....kindly suggest me how to install magickwand dll files in server after imagemagick sucessfully installed.

Expecting your great reply...
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 9
Reputation: AXJ is an unknown quantity at this point 
Solved Threads: 0
AXJ's Avatar
AXJ AXJ is offline Offline
Newbie Poster

Re: About image mirroring using php

 
0
  #6
Jul 4th, 2009
Hi we are trying to develope the same thing for AXJ and why reinvent the wheel. We will pay for the code. Thanks. AXJ
AXJ is an international civil and political rights organization working on networking with webmasters to help create our own VPN around the world.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC