473,398 Members | 2,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

imagecreatefromjpg with images from db??

hi!

how can i use imagecreatefromjpg if my images are stored in a database and
not in the filesystem? imagecreatefromjpg wants to have a filename. but i
have only the binarycode of the image in a string. has anybody a solution
simpler than storing the binarycode to a temp-file first?

thanks,
rainer
Jul 17 '05 #1
3 2818
"Rainer Collet" <ra***********@gmx.net> wrote:
how can i use imagecreatefromjpg if my images are stored in a database
and not in the filesystem? imagecreatefromjpg wants to have a
filename. but i have only the binarycode of the image in a string. has
anybody a solution simpler than storing the binarycode to a temp-file
first?


Use imagecreatefromstring():
http://uk.php.net/manual/en/function...fromstring.php

HTH;
JOn
Jul 17 '05 #2
"Jon Kraft" <jo*@jonux.co.uk> wrote:
Use imagecreatefromstring():
http://uk.php.net/manual/en/function...fromstring.php


thanks, i should rtfm ;-)

but what i do not understand is how does imagecreatefromstring determine the
imagetype? is it done automaticaly?
Jul 17 '05 #3
"Rainer Collet" <ra***********@gmx.net> wrote:
"Jon Kraft" <jo*@jonux.co.uk> wrote:
Use imagecreatefromstring():
http://uk.php.net/manual/en/function...fromstring.php


thanks, i should rtfm ;-)

but what i do not understand is how does imagecreatefromstring
determine the imagetype? is it done automaticaly?


Nope, you have to know which content type .. but you obviously already
knew it was a JPG :)

JOn
Jul 17 '05 #4

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

Similar topics

4
by: Fred | last post by:
Hi. I'm testing some php-functions at the moment and now I found an interesting function called 'imagecreatefromjpeg()' on php.net. I tried to work with it, but my apache always says: "Call to...
7
by: Wayne | last post by:
I have a script that uses filesystemobject that reads files from a given path, in my case images. It is running on a server that is 2000 adv svr w/ all current patches. The script prior to some...
11
by: Penelope Baker | last post by:
Greetings: I cannot seem to get IE 6.0 to pre-cache my rollover images. Every time the user rolls over a link, it rereads it from the server, even though it is well into the cache by that time....
2
by: Julie | last post by:
Hi, I'm trying to change images on a website without reloading the whole page and use the following code to preload the images: var preloadFlag = false; function preloadImages() { if...
3
by: Simon | last post by:
This problem has been driving me mad for months.... Seen a few posts on forums about it but no answers... No mention on MSDN etc. XP Pro SP1, VS.NET (c#) .Net framework 1.1, IIS 5.1. In a...
4
by: Bernie Raffe | last post by:
When I change the 'cookieless' flag in the WebConfig file to true, everything works fine on my local PC, but the images fail to appear when using the remote server. I specify my images...
4
toxicpaint
by: toxicpaint | last post by:
Hi, can anyone give me a hand. I'm currently displaying 4 random images at the top of a page. I did this using an array of 35 pictures and then writing them to page. The problem I have is that in...
5
by: remon87 | last post by:
I need some help. I have javasript that creates the submenu but it works if I have a text with css. I need it to do the same with a roll over images. so when I click on the image the submenu...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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
0
BarryA
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...
1
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...
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
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,...
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,...

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.