What can I do so that this image can be saved? | | http://hesterloli.dnsalias.com/test/...ript_image.htm
The image is the 100x100 px block. If we right-click in it and try to save the image we cannot. Is it possible to say set a mime-type so that it can be saved? Thanks.
--
George Hester
__________________________________ | | | | re: What can I do so that this image can be saved?
"George Hester" <hesterloli@hotmail.com> wrote in message
news:%Rmad.292475$bp1.261558@twister.nyroc.rr.com. .. http://hesterloli.dnsalias.com/test/...ript_image.htm
The image is the 100x100 px block. If we right-click in it and try to save
the image we cannot. Is it possible to say set a mime-type so that it can
be saved? Thanks.
--
George Hester
__________________________________
What image? I got an empty square box!
Looking at your source I see that you're generating an image not displaying
one from a file.
<script>
//XBM image start
var tiny = '#define x_width 1\n';
tiny += '#define x_height 1\n';
tiny += 'static char x_bits[] = {';
tiny += '0x00'; //image data
tiny += '};';
</script>
<img src="javascript :tiny" name="Single pixel image" width="100"
height="100" border="2" />
Good luck with that; I'm not familiar with it. | | | | re: What can I do so that this image can be saved?
"McKirahan" <News@McKirahan.com> wrote in message news:fAvad.369981$Fg5.57689@attbi_s53...[color=blue]
> "George Hester" <hesterloli@hotmail.com> wrote in message
> news:%Rmad.292475$bp1.261558@twister.nyroc.rr.com. ..
> http://hesterloli.dnsalias.com/test/...ript_image.htm
>
> The image is the 100x100 px block. If we right-click in it and try to save
> the image we cannot. Is it possible to say set a mime-type so that it can
> be saved? Thanks.
>
> --
> George Hester
> __________________________________
>
> What image? I got an empty square box!
>
> Looking at your source I see that you're generating an image not displaying
> one from a file.
>
> <script>
> //XBM image start
> var tiny = '#define x_width 1\n';
> tiny += '#define x_height 1\n';
> tiny += 'static char x_bits[] = {';
> tiny += '0x00'; //image data
> tiny += '};';
> </script>
>
> <img src="javascript :tiny" name="Single pixel image" width="100"
> height="100" border="2" />
>
> Good luck with that; I'm not familiar with it.
>
>[/color]
Hi McKirahan:
It turns out this can actually be used to keep any image from being able to save from the web.
Sure a well versed Internet user probably can save the image but using this and z-index we could lay this
XBM image over say a jpg and the image would not be savable without extra work.
I haven't done it here but I did it elsewhere. Works pretty good.
I do know that the actual construction of the XBM can take a while. But it is only 1px so it shouldn't be
noicable.
George Hester
__________________________________ | | | | re: What can I do so that this image can be saved?
George Hester said:
[color=blue]
>It turns out this can actually be used to keep any image from being able =
>to save from the web.[/color]
Just use screen capture. | | | | re: What can I do so that this image can be saved?
In article <cke5qi01hvp@drn.newsguy.com>, REM0VElbspamtrap@cox.net
enlightened us with...[color=blue]
> George Hester said:
>[color=green]
> >It turns out this can actually be used to keep any image from being able =
> >to save from the web.[/color]
>
> Just use screen capture.
>
>[/color]
Just use Firefox. ;)
--
--
~kaeli~
With her marriage, she got a new name and a dress. http://www.ipwebdesign.net/wildAtHeart http://www.ipwebdesign.net/kaelisSpace | | | | re: What can I do so that this image can be saved?
On Mon, 11 Oct 2004 10:53:30 -0500, kaeli
<tiny_one@NOSPAM.comcast.net> wrote:
[color=blue]
>In article <cke5qi01hvp@drn.newsguy.com>, REM0VElbspamtrap@cox.net
>enlightened us with...[color=green]
>> George Hester said:
>>[color=darkred]
>> >It turns out this can actually be used to keep any image from being able =
>> >to save from the web.[/color]
>>
>> Just use screen capture.
>>
>>[/color]
>
>Just use Firefox. ;)
>
>--[/color]
Just look in the cache! | | | | re: What can I do so that this image can be saved?
"Paul Cooper" <paul.cooper@Nobasspam.ac.uk> wrote in message news:vtblm0tgbduqhkscrrsulm31m7g9h6sgug@4ax.com...[color=blue]
> On Mon, 11 Oct 2004 10:53:30 -0500, kaeli
> <tiny_one@NOSPAM.comcast.net> wrote:
> [color=green]
> >In article <cke5qi01hvp@drn.newsguy.com>, REM0VElbspamtrap@cox.net
> >enlightened us with...[color=darkred]
> >> George Hester said:
> >>
> >> >It turns out this can actually be used to keep any image from being able =
> >> >to save from the web.
> >>
> >> Just use screen capture.
> >>
> >> [/color]
> >
> >Just use Firefox. ;)
> >
> >-- [/color]
>
> Just look in the cache!
> [/color]
Just do many things. Except right-click Save picture... Unless of course someone knows how to set the Mime type for it. I think it is a bitmap. The official mime-type is image/x-bitmap. But then that doesn't explain the weird error when it is tried.
George Hester
__________________________________ | | | | re: What can I do so that this image can be saved?
"kaeli" <tiny_one@NOSPAM.comcast.net> wrote in message news:MPG.1bd46872edc9ea998a1b3@nntp.lucent.com...[color=blue]
> In article <cke5qi01hvp@drn.newsguy.com>, REM0VElbspamtrap@cox.net
> enlightened us with...[color=green]
> > George Hester said:
> > [color=darkred]
> > >It turns out this can actually be used to keep any image from being able =
> > >to save from the web.[/color]
> >
> > Just use screen capture.
> >
> > [/color]
>
> Just use Firefox. ;)
>
> --
> --
> ~kaeli~
> With her marriage, she got a new name and a dress.
> http://www.ipwebdesign.net/wildAtHeart
> http://www.ipwebdesign.net/kaelisSpace
> [/color]
Can firefox really save that image? What is the file-type it saves it as? Thanks.
George Hester
__________________________________ | | | | re: What can I do so that this image can be saved?
George Hester said:
[color=blue]
>Just do many things. Except right-click Save picture... Unless of =
>course someone knows how to set the Mime type for it. I think it is a =
>bitmap. The official mime-type is image/x-bitmap. But then that =
>doesn't explain the weird error when it is tried.[/color]
It's not a matter of mime-type. The "source" of the image is a
Javascript function. When you try to save it, the browser tries
to rerun the function, but out of scope, so it fails. | | | | re: What can I do so that this image can be saved?
"Lee" <REM0VElbspamtrap@cox.net> wrote in message news:ckefds02ua7@drn.newsguy.com...[color=blue]
> George Hester said:
> [color=green]
> >Just do many things. Except right-click Save picture... Unless of =
> >course someone knows how to set the Mime type for it. I think it is a =
> >bitmap. The official mime-type is image/x-bitmap. But then that =
> >doesn't explain the weird error when it is tried.[/color]
>
> It's not a matter of mime-type. The "source" of the image is a
> Javascript function. When you try to save it, the browser tries
> to rerun the function, but out of scope, so it fails.
> [/color]
OK that's an explanation I understand. Can I write it to a file then? Permissions allowing assumed. Thanks.
George Hester
__________________________________ | | | | re: What can I do so that this image can be saved?
In article <Xns957F88244A51Bcastleamber@130.133.1.4>, postmaster@castleamber.com enlightened us with...[color=blue]
> kaeli wrote:
>[color=green]
> > In article <cke5qi01hvp@drn.newsguy.com>, REM0VElbspamtrap@cox.net
> > enlightened us with...[color=darkred]
> >> George Hester said:
> >>
> >> >It turns out this can actually be used to keep any image from being
> >> >able = to save from the web.
> >>
> >> Just use screen capture.
> >>[/color]
> >
> > Just use Firefox. ;)[/color]
>
> Did you try it with firefox?
>
>[/color]
No, sorry, I really should have looked at the file first.
I thought it was the standard garbage we see all the time here.
My bad. I should have read the whole thread. Well, we know how much I like to
make an idiot of myself now and then. (Don't say it)
That's very odd. A hex image generated by script.
And of course useless to people without javascript. And if it were a large
image, probably very bad on slow computers, but I dunno. I just know I stay
the heck away from bitmaps. *LOL*
Has anyone done this with a real, viewable image?
It's hard to play with a blank 1 pixel image.
Of course, screen caps work no matter what, but the quality isn't always that
great.
--
--
~kaeli~
A hangover is the wrath of grapes. http://www.ipwebdesign.net/wildAtHeart http://www.ipwebdesign.net/kaelisSpace | | | | re: What can I do so that this image can be saved?
kaeli wrote:[color=blue]
> That's very odd. A hex image generated by script.[/color]
There are not that many browsers that understand this application of the
javascript pseudo protocol:. The image string used is a string
representation of the contents of an image file. XBM images were the
only format that could be used in Netscape < 4.04 because its string
representation was null terminated so image files containing binary, and
so including bytes with zero values, would prematurely terminate the
string definitions (XBM files are ASCII text anyway). These days that
problem is gone (though I wonder about the implications of Unicode in
this context) so in theory other image formats can be used (I have never
tried).
XBM is a two color format so it is very limited. And some browsers do
not know how to interpret it anyway (even assuming they understand the
javascript: SRC).
[color=blue]
> And of course useless to people without javascript.
> And if it were a large image, probably very bad on
> slow computers, but I dunno.[/color]
It is 40+ bits to the byte storage, with no compression at all. That was
never going to be quick or efficient.
<snip>[color=blue]
> Has anyone done this with a real, viewable image?[/color]
It is a means by with a script generated image can be displayed so it
has been used, as the display end or javascript games for one. With XBM
being balck and white, and alternative image file formats requiring
compression (making it too time consuming to go form a script generated
bitmap to a string containing the image data) you won't see this used
often (I don't think I have ever seen it used outside of a javascript
game).
[color=blue]
> It's hard to play with a blank 1 pixel image.[/color]
If you would like to play with some XBM images that you can see try
these two:-
var crossImg = "#define cross_width 32\n"+
"#define cross_height 32\n"+
"static char cross_bits[] = {"+
"0x00, 0x00, 0x01, 0x00, "+
"0x00, 0x00, 0x01, 0x00, "+
"0x00, 0x00, 0x01, 0x00, "+
"0x00, 0x00, 0x01, 0x00, "+
"0x00, 0x00, 0x01, 0x00, "+
"0x00, 0xe0, 0x0f, 0x00, "+
"0x00, 0x18, 0x31, 0x00, "+
"0x00, 0x04, 0x41, 0x00, "+
"0x00, 0x02, 0x81, 0x00, "+
"0x00, 0x01, 0x01, 0x01, "+
"0x80, 0x00, 0x01, 0x02, "+
"0x80, 0x00, 0x01, 0x02, "+
"0x40, 0x00, 0x01, 0x04, "+
"0x40, 0x00, 0x01, 0x04, "+
"0x40, 0x00, 0x01, 0x04, "+
"0xff, 0xff, 0xff, 0xff, "+
"0x40, 0x00, 0x01, 0x04, "+
"0x40, 0x00, 0x01, 0x04, "+
"0x40, 0x00, 0x01, 0x04, "+
"0x80, 0x00, 0x01, 0x02, "+
"0x80, 0x00, 0x01, 0x02, "+
"0x00, 0x01, 0x01, 0x01, "+
"0x00, 0x02, 0x81, 0x00, "+
"0x00, 0x04, 0x41, 0x00, "+
"0x00, 0x18, 0x31, 0x00, "+
"0x00, 0xe0, 0x0f, 0x00, "+
"0x00, 0x00, 0x01, 0x00, "+
"0x00, 0x00, 0x01, 0x00, "+
"0x00, 0x00, 0x01, 0x00, "+
"0x00, 0x00, 0x01, 0x00, "+
"0x00, 0x00, 0x01, 0x00, "+
"0x00, 0x00, 0x01, 0x00 "+
"};"
var trash = "#define trash_width 16\n"+
"#define trash_height 16\n"+
"static char trash_bits[] = {"+
"0x00, 0x01, 0xe0, 0x0f, "+
"0x10, 0x10, 0xf8, 0x3f, "+
"0x10, 0x10, 0x50, 0x15, "+
"0x50, 0x15, 0x50, 0x15, "+
"0x50, 0x15, 0x50, 0x15, "+
"0x50, 0x15, 0x50, 0x15, "+
"0x50, 0x15, 0x10, 0x10, "+
"0xe0, 0x0f, 0x00, 0x00 "+
"};";
Note that low bits in the hex numbers are to the left of the byte when
displayed as pixels, but byte order is correct: left to right, top to
bottom).
[color=blue]
> Of course, screen caps work no matter what, but
> the quality isn't always that great.[/color]
As a notion of preventing the saving of images this script generated XBM
idea ranks alongside all George Hester's other ideas; best dismissed out
of hand.
Richard. | | | | re: What can I do so that this image can be saved?
"Richard Cornford" <Richard@litotes.demon.co.uk> wrote in message news:ckfaa4$6rd$1$8302bc10@news.demon.co.uk...[color=blue]
> kaeli wrote:[color=green]
> > That's very odd. A hex image generated by script.[/color]
>
> There are not that many browsers that understand this application of the
> javascript pseudo protocol:. The image string used is a string
> representation of the contents of an image file. XBM images were the
> only format that could be used in Netscape < 4.04 because its string
> representation was null terminated so image files containing binary, and
> so including bytes with zero values, would prematurely terminate the
> string definitions (XBM files are ASCII text anyway). These days that
> problem is gone (though I wonder about the implications of Unicode in
> this context) so in theory other image formats can be used (I have never
> tried).
>
> XBM is a two color format so it is very limited. And some browsers do
> not know how to interpret it anyway (even assuming they understand the
> javascript: SRC).
> [color=green]
> > And of course useless to people without javascript.
> > And if it were a large image, probably very bad on
> > slow computers, but I dunno.[/color]
>
> It is 40+ bits to the byte storage, with no compression at all. That was
> never going to be quick or efficient.
>
> <snip>[color=green]
> > Has anyone done this with a real, viewable image?[/color]
>
> It is a means by with a script generated image can be displayed so it
> has been used, as the display end or javascript games for one. With XBM
> being balck and white, and alternative image file formats requiring
> compression (making it too time consuming to go form a script generated
> bitmap to a string containing the image data) you won't see this used
> often (I don't think I have ever seen it used outside of a javascript
> game).
> [color=green]
> > It's hard to play with a blank 1 pixel image.[/color]
>
> If you would like to play with some XBM images that you can see try
> these two:-
>
> var crossImg = "#define cross_width 32\n"+
> "#define cross_height 32\n"+
> "static char cross_bits[] = {"+
> "0x00, 0x00, 0x01, 0x00, "+
> "0x00, 0x00, 0x01, 0x00, "+
> "0x00, 0x00, 0x01, 0x00, "+
> "0x00, 0x00, 0x01, 0x00, "+
> "0x00, 0x00, 0x01, 0x00, "+
> "0x00, 0xe0, 0x0f, 0x00, "+
> "0x00, 0x18, 0x31, 0x00, "+
> "0x00, 0x04, 0x41, 0x00, "+
> "0x00, 0x02, 0x81, 0x00, "+
> "0x00, 0x01, 0x01, 0x01, "+
> "0x80, 0x00, 0x01, 0x02, "+
> "0x80, 0x00, 0x01, 0x02, "+
> "0x40, 0x00, 0x01, 0x04, "+
> "0x40, 0x00, 0x01, 0x04, "+
> "0x40, 0x00, 0x01, 0x04, "+
> "0xff, 0xff, 0xff, 0xff, "+
> "0x40, 0x00, 0x01, 0x04, "+
> "0x40, 0x00, 0x01, 0x04, "+
> "0x40, 0x00, 0x01, 0x04, "+
> "0x80, 0x00, 0x01, 0x02, "+
> "0x80, 0x00, 0x01, 0x02, "+
> "0x00, 0x01, 0x01, 0x01, "+
> "0x00, 0x02, 0x81, 0x00, "+
> "0x00, 0x04, 0x41, 0x00, "+
> "0x00, 0x18, 0x31, 0x00, "+
> "0x00, 0xe0, 0x0f, 0x00, "+
> "0x00, 0x00, 0x01, 0x00, "+
> "0x00, 0x00, 0x01, 0x00, "+
> "0x00, 0x00, 0x01, 0x00, "+
> "0x00, 0x00, 0x01, 0x00, "+
> "0x00, 0x00, 0x01, 0x00, "+
> "0x00, 0x00, 0x01, 0x00 "+
> "};"
>
> var trash = "#define trash_width 16\n"+
> "#define trash_height 16\n"+
> "static char trash_bits[] = {"+
> "0x00, 0x01, 0xe0, 0x0f, "+
> "0x10, 0x10, 0xf8, 0x3f, "+
> "0x10, 0x10, 0x50, 0x15, "+
> "0x50, 0x15, 0x50, 0x15, "+
> "0x50, 0x15, 0x50, 0x15, "+
> "0x50, 0x15, 0x50, 0x15, "+
> "0x50, 0x15, 0x10, 0x10, "+
> "0xe0, 0x0f, 0x00, 0x00 "+
> "};";
>
> Note that low bits in the hex numbers are to the left of the byte when
> displayed as pixels, but byte order is correct: left to right, top to
> bottom).
> [color=green]
> > Of course, screen caps work no matter what, but
> > the quality isn't always that great.[/color]
>
> As a notion of preventing the saving of images this script generated XBM
> idea ranks alongside all George Hester's other ideas; best dismissed out
> of hand.
>
> Richard.
>
> [/color]
Never fails always has to do what he can to make George Hester seem like an imbecile. Thanks Richard.
You may not have noticed but the image I used is no bigger then a spacer.gif which is used pretty often on the Net. I can make that image as large as I want in the src and it don't do squat to the size.
--
George Hester
__________________________________ | | | | re: What can I do so that this image can be saved?
George Hester wrote:[color=blue]
> Never fails always has to do what he can to make George
> Hester seem like an imbecile. Thanks Richard.[/color]
There is no need to thank me, it is no effort.
[color=blue]
> You may not have noticed but the image I used is no bigger
> then a spacer.gif which is used pretty often on the Net.
> I can make that image as large as I want in the src and
> it don't do squat to the size.[/color]
A 1px square transparent GIF is 43 bytes (assuming correct image
optimisation), XBM is bigger than that in unavoidable overheads. And you
will be hard pressed to find a graphical browser that cannot handle GIF
images, which cannot be said for XBM.
Richard. |  | Similar JavaScript / Ajax / DHTML bytes | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,327 network members.
|