[OT] dynamic resolution web sites

Don Erickson derick at zeni.net
Sat Nov 5 17:09:50 CST 2005


On Sat, 5 Nov 2005, Jason Dewayne Clinton wrote:

> This is true inside of an SVG editor and perhaps also in SVG animations.
> However, on static SVG images in web pages, the SVG is rasterized and
> then blitted to the scroll buffer for hardware accelerated scrolling
> (this is true for Firefox, Konqueror and Opera). So there should be no
> difference once the picture has been rasterized.

I see.  I tried plugging a different SVG into your test page, but it 
didn't size.  I haven't really played too much with inkscape, maybe I 
didn't set the "viewbox" property?  Where the heck is that, anyway?

> Yes I think this is very interesting approach. I considered doing it
> using the Batik [1] server-size SVG rasterizer which can do almost
> exactly what you suggest but in the end the unresolved printing issue
> turned me off.

Yeah, I'm not much of a printer.  My ink is usually dried up, adn my wife 
won't let me use the lazer printer.

> Yes that's a huge improvement. It would print poorly but its ideal for
> screen display. This is also how the DejaVu file format works. It
> obtains huge compression ratios versus PDF but it isn't well suited for
> printing.

Well, if you get bored here's a script that can be easily edited to create 
a whole rash of .jpg libraries at any resolutions that you choose.  It's 
currently set to start with a directory full of .pngs and create 3 
libraries, but add enough array elements and you could fill a hard drive.

------------------------------------>8------------------------

#! /usr/bin/perl -w
##Don Erickson 2005
##convert8.5x11images.pl
##this script will create libraries of scaled images.  It is set for a 
##high-resolution 8.5x11 inch source file size using imagemagick.
##edit pix* arrays to define desired width and height ratios.

(@images)=qx (ls *.png);
print "@images\n";
$i=0;
@pixwidth = ("691","864","1037");
@pixheight = ("823","1029","1235");
@zoom = ("80","100","120");

foreach(@pixwidth) {
     print "creating image bank $pixwidth[$i] x $pixheight[$i]\n";
     # create the proper directory
     system(mkdir $zoom[$i])==0;

     foreach $_ (@images) {
         chomp ($change =($_));
     	if ($change) {
             $outchange = "$zoom[$i]/$change";
 	    $command = "convert -resize '$pixwidth[$i]x$pixheight[$i]' '$change' '$outchange'";
             system("$command");
     	    print "$command\n";
             $change =~ s/.png//;
             $change = "$zoom[$i]/$change";
             $outchange = "$change.jpg";
             system ("convert -depth 8 '$change.png' '$outchange'")==0;
     	}
     }
$i++;
}

print "\n\nFini\n";

  ------------------------------------------8<--------------------

>> On the other hand, experts have been telling me for years that the
>> whole world will be using broadband by Tuesday.
>
> We're at about 40-50% market saturation in the US aren't we? Maybe
> not...

I think that you have to count work and home environments to get up that 
high.  The number is certainly climbing though, no doubt about that.

Unless you consider the growing number of companies that firewall the 
internet from their employees...


Regards,

-Don


More information about the Kclug mailing list