Jump to content

[SOLVED] Displaying only a portion of a graphic image ?


Recommended Posts

I have a routine which reads in the names of all the GIF graphic files from a particular directory and displays the actual images but what I want to be able to do is just display a PART of each image.  For example, all of the images are 500 pixels wide by 55 pixels high and I want only to display the first hundred pixels width of the image so that I would in effect have just a portion of each image starting from the left and 100 pixels wide.  Can it be done ?

 

Another way of doing that would be to use the graphic images as the background to a defined area that's 100px wide by 55px high.  You could do that with a series of size-defined divs, but it might be easier to use a table with each cell having a different background defined and a transparent 100px by 55px image as cell content.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.