943,584 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 4717
  • PHP RSS
Dec 16th, 2006
0

About image mirroring using php

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
mahe4us is offline Offline
54 posts
since Sep 2006
Dec 18th, 2006
0

Re: About image mirroring using php

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..
Moderator
Reputation Points: 457
Solved Threads: 101
Nearly a Posting Virtuoso
digital-ether is offline Offline
1,250 posts
since Sep 2005
Dec 21st, 2006
0

Re: About image mirroring using php

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........
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
mahe4us is offline Offline
54 posts
since Sep 2006
Dec 22nd, 2006
0

Re: About image mirroring using php

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.
Moderator
Reputation Points: 457
Solved Threads: 101
Nearly a Posting Virtuoso
digital-ether is offline Offline
1,250 posts
since Sep 2005
Dec 23rd, 2006
0

Re: About image mirroring using php

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...
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
mahe4us is offline Offline
54 posts
since Sep 2006
Jul 4th, 2009
0

Re: About image mirroring using php

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
Reputation Points: 9
Solved Threads: 0
Newbie Poster
AXJ is offline Offline
9 posts
since Jul 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Trying to set up mirror service for web site.
Next Thread in PHP Forum Timeline: Problem with PhP MySql Ajax dropdown code





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC