473,797 Members | 3,199 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 #1
16 1823
<comp.lang.ph p>
<amit>
<Thu, 17 Apr 2008 13:25:49 -0700 (PDT)>
<bd************ *************** *******@k13g200 0hse.googlegrou ps.com>
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?
When i posted some code the other week to help you - the only thing you
did was critisise the way i named some variables - and to say you got a
division by zero .

While the slagging of the variable names i can accept - but its clear
you didnt actually even try the code before before altering it .

IMHO if you alter the code before even trying it to see if it worked or
not - then you are a idiot .

For if you had bothered to actually ask - then i would have told you
that you needed to change another part of the code if you changed the
maximum width/height dimentions of the thumbnail .

= you are a idiot who thinks they know everything but still asks for
help in how to do stuff .
--
www.krustov.co.uk
Jun 2 '08 #2
On Apr 17, 3:06*pm, Krustov <m...@privacy.n etwrote:
<comp.lang.ph p>
<amit>
<Thu, 17 Apr 2008 13:25:49 -0700 (PDT)>
<bd5b3af9-74e7-4df5-b742-ab8ea73c9...@k1 3g2000hse.googl egroups.com>
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?

When i posted some code the other week to help you - the only thing you
did was critisise the way i named some variables - and to say you got a
division by zero .

While the slagging of the variable names i can accept - but its clear
you didnt actually even try the code before before altering it .

IMHO if you alter the code before even trying it to see if it worked or
not - then you are a idiot .

For if you had bothered to actually ask - then i would have told you
that you needed to change another part of the code if you changed the
maximum width/height dimentions of the thumbnail .

= you are a idiot who thinks they know everything but still asks for
help in how to do stuff .

--www.krustov.co. uk

Hi Krustov,

I don't what you are mad about but this is what I found in that post.
I totally don't understand what part of it was critisizing you. Check
it out:
>Thank you but it is so confusing the way it is written in terms of
variable names. Also, I get so many division by zero.
The reason I didn't touch the code beacuse I just started learning PHP
in few weeks and didn't want to mess with the code since I don't know
everything. Do you change code before you learn or understand it?

BTW, did I use any bad names or did I insult you?!! I just said I'm
getting division by zero and did thank you in advance and I didin't
criticised you or your code!

However, I personally don't consider a PHP forum as a place to insult
people either they deserve it or not. BUT that's OK. Let's forget that
and again I thank you for your help in that post again. Good luck and
if you think I have attached you then I apologize you.

so let it go!!!


Jun 2 '08 #3
amit <am********@gma il.comwrote:
>
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!
It's a native extension. That means the class is available without having
to import anything, just like the other extensions (for example, Postgres
or MySQL).

Didn't you look at ANY of the examples in the documentation? That's what
they're there for.
--
Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Jun 2 '08 #4
Tim Roberts wrote:
It's a native extension. That means the class is available without having
to import anything, just like the other extensions (for example, Postgres
or MySQL).
Afaik, it's native from php 5.1.3.
Also, it's still marked as experimental, and I'm not sure if it's
bundled with windows version. Manual mentions the need to download
binaries from imagemagic.org

to Amit:
After you download the extension binaries. Put the dll into your
extensions direcotry, and make sure your php.ini files has following line:
extension=php_i magick.dll

best regards
Piotr N
Jun 2 '08 #5
On Apr 18, 4:10*am, Piotr <s...@poczta.on et.plwrote:
Tim Roberts wrote:
It's a native extension. *That means the class is available without having
to import anything, just like the other extensions (for example, Postgres
or MySQL).

Afaik, it's native from php 5.1.3.
Also, it's still marked as experimental, and I'm not sure if it's
bundled with windows version. Manual mentions the need to download
binaries from imagemagic.org

to Amit:
After you download the extension binaries. Put the dll into your
extensions direcotry, and make sure your php.ini files has following line:
extension=php_i magick.dll

best regards
Piotr N

Hello Tim and Piotr,

Thanks for your response but I am not using Windows server instead
using using Linux which as far as I know it doesn't have dll file. Or
maybe the file you are taking about works for Linux as well. I'm new
to PHP and not familiar with these steps.

Ok, what I did was installing it from http://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 and PHP was complaining about new() operator.

Any advice is appreciated.

Regards.


Jun 2 '08 #6
amit wrote:
Ok, what I did was installing it from http://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 and PHP was 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 your PHP. Easiest way to do that,
will be to launch your system packed manager (software installation
tool) and search for php and 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 have PHP 5.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 is PHP image magic function reference:
http://pl.php.net/manual/pl/book.imagick.php

PS. Keep in mind, that most hosting companies do not provide this
extension. Another image library, called GD is usually compiled into PHP
and available on most hosting servers.

best regards
Piotr N
Jun 2 '08 #7
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
its PHP extension 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 from http://pecl.php.net/package/imagick ?

Please let me know this .
All the best,
Amit


Jun 2 '08 #8
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.

Jun 2 '08 #9
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
itsPHPextensio n as well?
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?

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.
Jun 2 '08 #10

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
5743
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
2565
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
2012
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
2037
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
9685
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
9537
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10246
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10023
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
9066
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...
0
6803
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3750
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2934
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.