i have this situation. i have a query string: http://www.myquerystring.com?x=xxxxx
what this url does is it will return or start downloading a .png file.
what i wanted to do is trap this png file and manipuate the image like
resizing, color...etc. how can i do this? 8 1957
On Thu, 21 Jun 2007 09:01:43 +0200, shotokan99 <so**********@yahoo.com
wrote:
i have this situation. i have a query string:
http://www.myquerystring.com?x=xxxxx
what this url does is it will return or start downloading a .png file.
what i wanted to do is trap this png file and manipuate the image like
resizing, color...etc. how can i do this?
If allow_url_fopen is enabled you should be able to retrieve & alter it
using the GD functions.
--
Rik Wasmus
allow_url_fopen is close but i can use curl. how to do it?
Are you looking to modify the PNG on the server
or the client within the browser ?
If you want to modify Server side then look at the GD library. Here
are two good links for that www.libgd.org/Main_Page
- GD - Open Source library http://www.codebeach.com/index.asp?t...ubcategoryID=4
- GD Tutorials
If you want to modify within the browser you might
consider use of an ActiveX component like our own
MetaDraw 3 OCX ( see www.Bennet-Tec.com) , or ImageMan ( from
DataTechniques www.Data-Tech.com ).
* MetaDraw will allow resizing, drawing / annotation, ..
by client side script or even ( if you allow ) by the
end-user with his mouse within the browser. * ImageMan
is great for things like Resizing, Rotation, Color depth
manipulation, Gamma correction, ...
* * Please include a copy of this message with your reply
-----
Jeff Bennett Je**@Bennet-Tec.Com
* Bennet-Tec Information Systems, Inc
* 50 Jericho Tpk, Jericho, NY 11753
* Phone 516 997 5596, Fax - 5597
* RELIABLE Components Make You Look Sharp!
* TList/Pro * ALLText HT/Pro * MetaDraw *
* Custom Software Development Services Too.
* WWW.Bennet-Tec.Com
=================== ===================
On Jun 21, 3:01 am,
shotokan99 <so**********@yahoo.com>
wrote:
i have this situation. i have a query string:
http://www.myquerystring.com?x=xxxxx
what this url does is it will return or start downloading a .png file.
what i wanted to do is trap this png file and manipuate the image like
resizing, color...etc. how can i do this?
======================================
actually i was able to work it out using this code:
$ch = curl_init();
$timeout = 0;
curl_setopt ($ch, CURLOPT_URL, $xmyurl);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
// Getting binary data
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
$image = curl_exec($ch);
curl_close($ch);
and display the output this way:
header("Content-type: image/png");
echo $image;
now what i want to do is edit that $image as png file using gd. i
tried it:
header('Content-type: image/png');
$xbase = @imagecreatetruecolor(130,168);
$xback=imagecolorallocate($xbase, 39,138,8); //green
imagefill($xbase,0,0,$xback);
imagecopy($xbase,$image,0, 28, 0, 0, 130,140);
imagepng($xbase);
what supposed to happen is $image should be inside $xbase frame.
however it doesnt work, instead only $xbase is showing. what to do
with this?
actually i come up with this:
ch = curl_init();
$timeout = 0;
curl_setopt ($ch, CURLOPT_URL, $xmyurl);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
// Getting binary data
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
$image = curl_exec($ch);
curl_close($ch);
and display the output this way:
header("Content-type: image/png");
echo $image;
now what i want to do is edit $image as png file using gd. i tried it:
header('Content-type: image/png');
$xbase = @imagecreatetruecolor(130,168);
$xback=imagecolorallocate($xbase, 39,138,8); //green
imagefill($xbase,0,0,$xback);
imagecopy($xbase,$image,0, 28, 0, 0, 130,140);
imagepng($xbase);
what supposed to happen is $image should be inside $xbase frame.
however it doesnt work, instead only $xbase is showing. what to do
with this?
On Fri, 22 Jun 2007 05:07:24 +0200, shotokan99 <so**********@yahoo.com
wrote:
actually i come up with this:
ch = curl_init();
$timeout = 0;
curl_setopt ($ch, CURLOPT_URL, $xmyurl);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
// Getting binary data
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
$image = curl_exec($ch);
curl_close($ch);
and display the output this way:
header("Content-type: image/png");
echo $image;
now what i want to do is edit $image as png file using gd. i tried it:
header('Content-type: image/png');
$xbase = @imagecreatetruecolor(130,168);
$xback=imagecolorallocate($xbase, 39,138,8); //green
imagefill($xbase,0,0,$xback);
imagecopy($xbase,$image,0, 28, 0, 0, 130,140);
imagepng($xbase);
what supposed to happen is $image should be inside $xbase frame.
however it doesnt work, instead only $xbase is showing. what to do
with this?
An image resource is NOT the raw data. Get the image, store it temporarily
on you computer, create an image resource with an imagecreatefrom*()
function and you've got it.
--
Rik Wasmus This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Rune Johansen |
last post by:
Hi.
I'm doing some image manipulation in an applet using the example code on
this page:
http://www.akop.org/art/pixels3.htm
However, I really want an application rather than an applet, I just...
|
by: Job |
last post by:
Hi,
I would like to find out what ASP/ASP.net can do with image manipulation.
Does ASP have built in functions (eg. after upload to server) to
manipulate images, like rotate, scale, crop etc.?...
|
by: peterf |
last post by:
Posted in alt.comp.lang.php before I saw how much more active this group
is... Hope someone can help.
I am new to this group and needing a little bit of guidance. First off I
need to say that...
|
by: zacariaz |
last post by:
I dont know, and i dont much like javascript, however, i am told that
the only way to do want i want to do, is with javascript, so here goes.
zoom and cut is the only features i need.
1. the...
|
by: kebalex |
last post by:
Hi,
I have an app (written in .NET 2.0) which updates a picturebox
according to some user input (a slider control). when the user makes a
change i loop through all of the pixels, do a...
|
by: Michiel Sikma |
last post by:
Hello everybody.
I'm currently involved in a site building project in which we're
going to use the Google Maps API. The user will be able to browse the
site by looking over a really large image,...
|
by: L'eau Prosper Research |
last post by:
Press Release:
L'eau Prosper Research (Website: http://www.leauprosper.com) releases
new TradeStation 8 Add-on - L'eau Prosper Market Manipulation
Profiling Tools Set.
L'eau Prosper Market...
|
by: L'eau Prosper Research |
last post by:
NEW TradeStation 8 Add-on - L'eau Prosper Market Manipulation
Profiling Tools Set By L'eau Prosper Research
Press Release:
L'eau Prosper Research (Website: http://www.leauprosper.com) releases...
|
by: laredotornado |
last post by:
Hi,
I'm using PHP 5. I was wondering given an image, a.jpg, how can I
make an image that would look like you slid a white index card (which
I have a file, white.jpg with the same dimensions as...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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...
|
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,...
|
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...
| |