473,463 Members | 1,532 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

quick imagecreatefromjpeg question

On my way out the door, but will need to know this in the AM. (and no, I
didn't have time to RTMF...)

Can I use raw data instead of a file patch with imagecreatefromjpeg?

For instance, I used fread to get the contents of a JPEG image, now I
need to resize. imagecreatefromjpeg is the first step in my routine, but
I haven't used the raw data before. Just wondering if anyone else has
done this and can point me in the right direction.

If this is covered in the manual, just ignore the post (unless you have
something to ad). {sorry}

--
Justin Koivisto - sp**@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.

Jul 17 '05 #1
3 2182
Justin Koivisto wrote:
On my way out the door, but will need to know this in the AM. (and no, I
didn't have time to RTMF...)

Can I use raw data instead of a file patch with imagecreatefromjpeg?

For instance, I used fread to get the contents of a JPEG image, now I
need to resize. imagecreatefromjpeg is the first step in my routine, but
I haven't used the raw data before. Just wondering if anyone else has
done this and can point me in the right direction.

If this is covered in the manual, just ignore the post (unless you have
something to ad). {sorry}


For those curious, the answer was no. You have to write out a temp file
first.

--
Justin Koivisto - sp**@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.

Jul 17 '05 #2
On Fri, 03 Oct 2003 13:04:21 GMT, Justin Koivisto <sp**@koivi.com>
wrote:
Justin Koivisto wrote:
On my way out the door, but will need to know this in the AM. (and no, I
didn't have time to RTMF...)

Can I use raw data instead of a file patch with imagecreatefromjpeg?

For instance, I used fread to get the contents of a JPEG image, now I
need to resize. imagecreatefromjpeg is the first step in my routine, but
I haven't used the raw data before. Just wondering if anyone else has
done this and can point me in the right direction.

If this is covered in the manual, just ignore the post (unless you have
something to ad). {sorry}


For those curious, the answer was no. You have to write out a temp file
first.


Does imagecreatefromstring not work?

Jul 17 '05 #3
Andy Hassall wrote:
On Fri, 03 Oct 2003 13:04:21 GMT, Justin Koivisto <sp**@koivi.com>
wrote:

Justin Koivisto wrote:
On my way out the door, but will need to know this in the AM. (and no, I
didn't have time to RTMF...)

Can I use raw data instead of a file patch with imagecreatefromjpeg?

For instance, I used fread to get the contents of a JPEG image, now I
need to resize. imagecreatefromjpeg is the first step in my routine, but
I haven't used the raw data before. Just wondering if anyone else has
done this and can point me in the right direction.

If this is covered in the manual, just ignore the post (unless you have
something to ad). {sorry}


For those curious, the answer was no. You have to write out a temp file
first.

Does imagecreatefromstring not work?


heh, never even thought about looking for other functions to do it... I
was modifying a class method that I had previously written to work with
files. Oh well... at least I know where to look next time I need to do
this, thanks.

--
Justin Koivisto - sp**@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.

Jul 17 '05 #4

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

Similar topics

5
by: Daniel Hansen | last post by:
I am getting a "Fatal error: Call to undefined function: imagecreatefromjpeg() in..." error in one of my scripts, and after doing a bit of searching on the 'net I found various messages relating to...
4
by: jn | last post by:
I'm working with images from a Kodak 2MP camera. It looks like the function will only create a resource if I give it horiznotal pictures from this camera....if I give it vertical (height larger...
4
by: Mike | last post by:
hopefully this is an easy one to solve and I'm just missing something little... basically, I had a nice little website running with php, apache, etc... that uses imagecreatefromjpeg to create...
2
by: Simon Stewart | last post by:
Has anyone else experience of imagecreatefromjpeg failing with an error message about memory even though the size of the image being uploaded is nothing like the space available to the script? ...
1
by: Olivier | last post by:
Hi, I have the following code in my php script : $fhSrc = imagecreatefromjpeg($srcFile); This cause me the following error : Fatal error: Allowed memory size of 8388608 bytes exhausted (tried...
6
by: comp.lang.php | last post by:
PHP version 4.3.9 GD version 2.0.2 Whenever I use imagecreatefromjpeg(), PHP completely dies. No errors, no warnings, no notices, it dies in the following manner: If using Firefox it just...
5
by: Areric | last post by:
Ok all. I have a series of images stored in a db. Im trying to work on a script that will let me scale them based on user input. Ive hit a bit of a roadblock on this line. $orig =...
4
by: jeffsnox | last post by:
Hi, I'm struggling to get imagecreatefromjpeg to work correctly. I'm running PHP 4.3.9 with GD bundled (2.0.28 compatible). If I run this: $myimage = imagecreatefromjpeg("myfilename");
1
by: tim.landgraf | last post by:
hi there, i am experiencing a strange problem. i am iterating through a given directory, selecting only jpg - images that are then resized and inserted into a database. everything works, but if...
0
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,...
0
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...
0
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...
0
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...
0
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,...
0
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...
0
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...
0
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...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.