473,806 Members | 2,771 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP and Image processing



Hello group,
Few weeks ago, somebody suggested me to use Imagick for image
manipulation/processing. I installed it and now want to start learning
it so I did start with an example but what other steps should I take
after installation?
As you know better I need to instantiate an object from a class but
there is no any include file to add the library to my project!

Can somebody please give me some hints on this?
Thanks,
Amit
Jun 2 '08
16 1825
amit wrote:
>Thank you so much for your the information.
1) Are you saying that I only have installed Image_Magick but must add
itsPHPextensio n as well?
Yes, that is what I suspect.
>2) Is this a good place to install it? (http://php.net/manual/en/
install.pecl.p hp)
3) and ?then the extension fromhttp://pecl.php.net/package/imagick?
Yes, ussing PECL installer might be a good solution, but as i recomended
before, *first* try using your distribution software installer tool.
I get: -bash: pecl: command not found
so I guess I have to install pecl as well.
Again, try using your linux software installer tool to add pecl.
It will save you alot of pain.

best regards
Piotr N
Jun 2 '08 #11
On Apr 22, 5:34*pm, The Natural Philosopher <a...@b.cwrot e:
amit wrote:
On Apr 22, 10:49 am, amit <amit.ko...@gma il.comwrote:
On Apr 21, 2:13 pm, Piotr <s...@poczta.on et.plwrote:
>amit wrote:
Ok, what I did was installing it fromhttp://www.imagemagick .org/script/install-source.php
Then I followed all steps which finally after verification it was able
to create a GIF file. Now, I don't know how to include it in my code.
Once I tried to run it andPHPwas complaining about new() operator.
Any advice is appreciated.
Link you provided refers to ImageMagic alone, what you need to do,
is to add imagemagic extension to yourPHP. Easiest way to do that,
will be to launch your system packed manager (software installation
tool) and search for *phpand imagemagic. You should find packed that
provides that. Most popular distributions should provide that. Although
you might need additional repositories. You can also seek for a packed
in google and download and install it.
You might also try using PECL installer to add imagick,
to do so, issue:
pecl install imagick
Note that you might need to be root to complete the installation.
If you havePHP5.1.3, then needed extension might already be present.
To check it, issue in your console:php-i |grep imagick
If you get some data, then it's present.
Once the extension is loaded, you can simply use it's functions and
objects. You need not 'import' or 'include' anything.
Here isPHPimagemagic function reference:http://pl.php.net/manual/pl/book.imagick.php
PS. Keep in mind, that most hosting companies do not provide this
extension. Anotherimagelib rary, called GD is usually compiled intoPHP
and available on most hosting servers.
best regards
Piotr N
Hi Piotr,
Thank you so much for your the information.
1) Are you saying that I only have installed Image_Magick but must add
itsPHPextension as well?
2) Is this a good place to install it? (http://php.net/manual/en/
install.pecl.ph p)
3) and *then the extension fromhttp://pecl.php.net/package/imagick?
Please let me know this .
All the best,
Amit- Hide quoted text -
- Show quoted text -
Also, when I run:
* * * *pecl install imagick
I get: -bash: pecl: command not found
so I guess I have to install pecl as well.
Thanks.

the pain doesn't stop there.

I gave up on ImageMagick and found a smaller library that did all I needed..- Hide quoted text -

- Show quoted text -

Hi,

May I ask what is the library you found? I'm having so many trouble
with Image Magick !!!

Regards.
Jun 2 '08 #12
On Apr 23, 1:11*am, Piotr <s...@poczta.on et.plwrote:
amit wrote:
Thank you so much for your the information.
1) Are you saying that I only have installed Image_Magick but must add
itsPHPextension as well?

Yes, that is what I suspect.
2) Is this a good place to install it? (http://php.net/manual/en/
install.pecl.ph p)
3) and ?then the extension fromhttp://pecl.php.net/package/imagick?

Yes, ussing PECL installer might be a good solution, but as i recomended
before, *first* try using your distribution software installer tool.
I get: -bash: pecl: command not found
so I guess I have to install pecl as well.

Again, try using your linux software installer tool to add pecl.
It will save you alot of pain.

best regards
Piotr N

Yes you were right. At the beginning I didn't undestand what you mean
but now I can see the pain using Image Magick!
It is about 2 days I've spend time on it and no luck yet. It only
would work in command line. I don't know what they have thought to
design such a thing.
Why it is not stright forward?

I even decided to format my server and use a different Linux distro
but changed my mind since others are complaining that it would be
cause other issues so not sure what to do!!!!

Jun 2 '08 #13
amit wrote:
Yes you were right. At the beginning I didn't undestand what you mean
but now I can see the pain using Image Magick!
It is about 2 days I've spend time on it and no luck yet. It only
would work in command line. I don't know what they have thought to
design such a thing.
Why it is not stright forward?
Amit, I get the impression you are not reading my posts.
I'm really trying to help you...

What is your linux name ? (distribution)

Have you installed ImageMagic PHP *extension* ?

To install the extension, do followning

For Ubuntu Linux:
sudo apt-get install php5-imagick

For openSuse Linux:
sudo yast -i php5-imagick
(you might need to add server:php to your repositories)

For help with linux installation problems, ask on related newsgroup.

It might be also good to restart your apache web server after
installation, to make sure extension is loaded.

best regards
Piotr N
Jun 2 '08 #14
On Apr 25, 1:48*am, Piotr <s...@poczta.on et.plwrote:
amit wrote:
Yes you were right. At the beginning I didn't undestand what you mean
but now I can see the pain usingImageMagic k!
It is about 2 days I've spend time on it and no luck yet. It only
would work in command line. I don't know what they have thought to
design such a thing.
Why it is not stright forward?

Amit, I get the impression you are not reading my posts.
I'm really trying to help you...

What is your linux name ? (distribution)

Have you installed ImageMagic PHP *extension* ?

To install the extension, do followning

For Ubuntu Linux:
sudo apt-get install php5-imagick

For openSuse Linux:
sudo yast -i php5-imagick
(you might need to add server:php to your repositories)

For help with linux installation problems, ask on related newsgroup.

It might be also good to restart your apache web server after
installation, to make sure extension is loaded.

best regards
Piotr N

Hi Piotr,

The OS I'm using on server is Redhat Enterprise 5. I think problem
starts from here since when I run yum I get a message as:

# yum install php-devel
Loading "installonl yn" plugin
Loading "rhnplugin" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Setting up repositories
No Repositories Available to Set Up
Reading repository metadata in from local files
Parsing package install arguments
Setting up repositories
No Repositories Available to Set Up
Reading repository metadata in from local files
No Match for argument: php-devel
Nothing to do

It seems I have to pay to have this support. Right? so I'm installing
CentOS so that will be solved in terms of installatin tools.
I'm going thru your previous posts to see what I have been missing.
Thanks for your patience. I'll get back to you as soon as I'm done
with installation and steps you had mentioned.

Regards.
Jun 2 '08 #15
amit wrote:
The OS I'm using on server is Redhat Enterprise 5. I think problem
starts from here since when I run yum I get a message as:

# yum install php-devel
You don't need php-dev, try:
yum install php-imagick

Not sure if that is the right package name...

best regards
Piotr n
Jun 2 '08 #16
On Apr 25, 12:00*pm, Piotr <s...@poczta.on et.plwrote:
amit wrote:
The OS I'm using on server is Redhat Enterprise 5. I think problem
starts from here since when I run yum I get a message as:
# yum install php-devel

You don't need php-dev, try:
yum install php-imagick

Not sure if that is the right package name...

best regards
Piotr n

Hi Piotr,

I tried the command but this is what I get again:

[root@ html]# yum install php-imagick
Loading "installonl yn" plugin
Setting up Install Process
Setting up repositories
base 100% |============== ===========| 1.1 kB
00:00
updates 100% |============== ===========| 951 B
00:00
addons 100% |============== ===========| 951 B
00:00
extras 100% |============== ===========| 1.1 kB
00:00
Reading repository metadata in from local files
Parsing package install arguments
Nothing to do
and I know it is not installed yet!!!! now what should I do?

Regards.
Jun 2 '08 #17

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
14547
by: | last post by:
Hi, we are planning to rewrite an extisting C++ image processing application/library in C#. Now several question arouse where I hope you can help me: So far we allocated a block of memory as image buffer, handed this to a driver dll and got raw image data back in this buffer. We then handed this buffer by reference to another C++ dll to do base image processing on it. Alternativly we copy an area of the whole image to a newly...
10
5748
by: Enrique Cruiz | last post by:
Hello all, I am currently implementing a fairly simple algorithm. It scans a grayscale image, and computes a pixel's new value as a function of its original value. Two passes are made, first horizontally and second vertically. The problem I have is that the vertical pass is 3 to 4 times slower than the horizontal, although the code is _exactly_ the same in both cases?! The code itself is very simple. There are 2 loops to scan through...
3
2566
by: birensubudhi | last post by:
hey guys,can anyone tell me what is image processing, how to do it using C. IN KSHITIJ 2007 held at IIT kgp a que by INFOSYS is asked, they hav given an image then cut in different orientation ,put in a abstract(unordered) manner & asked to jumble it using C PROGRAMMING to get the real image.
5
2013
by: whisk3rs | last post by:
Hello, I have a conceptual question. I need to write a program that will take as input a list of images and then process each image individually (extract useful features from the image) Processing each image takes about 20 seconds, and I would like to utilize all available cores / CPUs on a machine to do processing in parallel - for simplicity, I think it'd be easier for now to have each core process an individual image (rather than have...
0
2038
by: tavares | last post by:
(Our apologies for cross-posting. We appreciate if you kindly distribute this information by your co- workers and colleagues.) *************************************************************************** Symposium “Image Processing and Data Visualization” 2nd South-East European Conference on Computational Mechanics (SEECCM 2009) Island of Rhodes, Greece, 22-24 June 2009
0
9719
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10623
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10111
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9192
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7650
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5546
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5683
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3852
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3010
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.