473,396 Members | 1,860 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,396 software developers and data experts.

php generated images vs image file...which is better?

hi,

shall we say you want to creae a banner, a button, and other images
for your site. some create images on the fly through php using gd
library. is this more advisable or more efficient compared to creating
an image file (.jpg) shall we say using photoshop?

Jun 29 '07 #1
3 1651
shall we say you want to creae a banner, a button, and other images
for your site. some create images on the fly through php using gd
library. is this more advisable or more efficient compared to creating
an image file (.jpg) shall we say using photoshop?
If there is no reason to create the images on the fly then a hard copy of
the image is always the best option. If you create images on the fly then
php will have to create the image everytime it is requested which wastes
server resources.
Jun 29 '07 #2
peter wrote:
>shall we say you want to creae a banner, a button, and other images
for your site. some create images on the fly through php using gd
library. is this more advisable or more efficient compared to creating
an image file (.jpg) shall we say using photoshop?

If there is no reason to create the images on the fly then a hard copy of
the image is always the best option. If you create images on the fly then
php will have to create the image everytime it is requested which wastes
server resources.

Yup and if you must create images in the fly for whatever reason atleast
cache the images that you have made

if(file_exists($img))
{
// include image
}
else
{
//create image
/ cache image
}
Jun 29 '07 #3
shotokan99 wrote:
hi,

shall we say you want to creae a banner, a button, and other images
for your site. some create images on the fly through php using gd
library. is this more advisable or more efficient compared to creating
an image file (.jpg) shall we say using photoshop?
Every time you unlock a door, do you get a new key made? If the lock
doesn't change, of course you don't. But if the lock changed every
time, you would have to.

If the image is static, then just generate it once and save it. But if
the image is dynamic, then you need to generate it every time.

Most of the dynamic creation I've seen are things like CAPTCHA, graphs
dependent on changing data, etc.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jun 29 '07 #4

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

Similar topics

2
by: Tim Flynn | last post by:
Hi, I'm trying to write a simple image viewer using Tkinter and ImageTk from the PIL toolkit. The images are stored in memory and I don't want to create temporary files for them. My code...
14
by: Akbar | last post by:
Hey there, Big-time curiosity issue here... Here's the test code (it's not that long)... it's to display a large number of image links with captions, ideally pulled in from an external file...
4
by: Dom Hicklin | last post by:
I have created a form onto which images can be dropped and thus added to the OLE field of a Table (Access 2000 linked to SQL 2000 server). I use the Stephen Lebans ExportOLE function to do this...
9
by: charliewest | last post by:
Hello - I have images saved in my SQL SERVER 2000 database. Using ASP.NET (C#) is there any way to temporarily save an image to a session object, and after running some other operations, later...
61
by: phil-news-nospam | last post by:
Why does SVG need a different tag than other images? IMHO, SVG should be implemented as an image type just like any other image type, allowing it to work with <img> tags, and ... here is the...
0
by: Stedak | last post by:
We are scanning images and saving them as TIFF's in a database. We are running into some problems because in the creation of the TIFF the EncoderValue.CompressionLZW is ignored. It does not seem to...
4
by: Rico | last post by:
Hello, I have an MDE application where I use a bound object frame to display an image. This frame is updatable and bested on the contents of an OLE field. My problem is, some images display as...
6
by: Rob | last post by:
Hello, I'm sure this has come up before. I have need for a collection of all elements/objects in an HTML document that have any kind of an attribute (HTML or CSS) that is making use of a URL to...
2
by: neovantage | last post by:
Hey all, I have created transparent PNG images from text dynamically. But it edges are pixel-ate or we can say edges are distorted. Here is my LINK which shows my generated transparent PNG image....
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.