On May 5, 1:15 am, sarika <sarikason...@gmail.comwrote:
Hi All
i m making a web site having number of big images. My requirement is i
want to dunamically split the images while downloading so that my
website works fast and image downloading does not not much time.
I need a script in php for doing this.
Please help me .Your help will be highly appreciated.
You can do many things with images, such as splitting them, using the
GD PHP extension, which is installed on many versions of PHP since the
mid 4 versions. However, if you have not used GD before, you will have
much to learn, and I do not have "cookbook" code to copy - there are
so many ways one might want to do this. I just recently split an image
into 5 strips, but did not separate the strips, to make an image map
that will do different things when clicked in 5 different areas. This
was all done with GD.
Very few have to worry about loading time for images anymore if the
page is properly designed for the web. The solution starts with the
basic image and proper html design. Do not use large byte size images
on web pages. If you have a lot of images on a web page that are of
fairly large byte size, consider using only thumbnails on the main
page that bring up higher resolution images on other pages when
clicked. Reduce the image size as much as you can and still leave the
image good enough. This can be done using a good image tool - I use
PaintShop Pro, and there are many others. You can reduce the size of
the image used, the number of colors used, etc with such a tool. For
some image formats you can adjust the tool to make an image that
quickly appears as a whole in low resolution nearly at once, and the
resolution is increased as the image downloads. If you have enough
images to slow down loading of the page, it is very important to give
both the height and width of all images. If you do this, the text all
loads at first rapidly and space is reserved for each image. Then the
images are loaded while the viewer is reading the page. Keep in mind
that anything you do after the images are finally processed will not
make the total page download any faster. It just will make it possible
to start viewing part of the page, such as text, before the download
is complete.
The easy way to slice and dice images is with an image tool on your
computer, such as PaintShop Pro. See my page at
http://www.cwdjr.net/test/picturePuzzle.html
for an image that has been sliced and diced into 36 pieces using Paint
shop. The tool automatically names each of the 36 pieces of image with
column and row numbers, and it will write much of the html for putting
the image pieces back together again, saving you a huge amount of
work. Then you can upload a directory of all 36 pieces to your server
with a key click or two using FTP.