Re: [NH] Display only part of an image?
I don't understand why you can't just use a graphics program such as Irfanview
to either crop or resize the image. It is so much simpler to do that than any
of the "solutions" using html or CSS or clips. You can do a very precise crop
and//or resize in a minute to make a graphic fit a particular space.
I have some boxes that are 180 px wide and 114 px high and I can crop and
resize to that exact size (or very close) using Irfanview. Again, I don't understand
why you want to do it some other way. There are a number of programs that will
do this; Irfanview is excellent and free.
--- On Sun, 9/14/08, Marcelo de Castro Bastos <mcblista@...> wrote:
From: Marcelo de Castro Bastos <mcblista@...>
Subject: [NH] Display only part of an image?
Date: Sunday, September 14, 2008, 12:27 PM
Here's a thing I'm not sure it's even possible, but I would like to find
Is there a way to display only *part* of an image file in a Web page?
For instance, if I have a 300 x 400 px photo, can I "crop" it in
HTML/CSS in order to display just a smaller rectangle inside it (like
one cropping 50 px from the top and left, and 100 px wide?)
Where do you want to bug today?
* TagZilla 0.066 on Seamonkey 1.1.11
[Non-text portions of this message have been removed]
- I'm new here, Marcelo, but maybe this article will help:
This is a fairly common technique in building CSS-styled menus,
--- In firstname.lastname@example.org, Marcelo de Castro Bastos
> Interviewed by CNN on 14/9/2008 15:16, Axel Berger told the world:
> > Marcelo de Castro Bastos wrote:
> >> can I "crop" it in HTML/CSS in order to display just a smaller
> >> rectangle inside it
> > I'm not more than 98 % sure, but as far as I know it isn't.
> > But if it were possible you shouldn't do it. The whole image needs
> > to be downloaded anyway. This would be similar do scaling down in
> > HTML - I've seen 100 by 50 thumbnails that take ages to display.
> I fully understand the issue, and it was more of an intellectual
> curiosity... it's not actually for a production site, I was just
> wondering if I could pull it off without firing up an image editor.
> In this particular case, the whole image would have to be loaded anyway
> -- it is a comic-book-like page, and I wanted to "move around" the
> individual panels to add text comments besides each one. From the
> understand web browsers work, they wouldn't download the image 6 times.picture).
> And this way, there would be the extra bonus of preserving the full
> image (avoiding the need for a separate download to get the full
> I'll have to look into John Zeman's iframe solution and Cary Driscoll's
> CSS solution to see if they are applicable to this particular situation.
> The idea occurred to me after I recently read the specs for the
> "border-image" CSS3 feature -- it works by taking parts of a image file
> to draw borders. I thought that there might be a more general way to
> partial images, and wanted to try to figure it out...
> Now...witness the power of this *FULLY ARMED AND OPERATIONAL* Tagline!
> * TagZilla 0.066 on Seamonkey 1.1.11