Re: puzzling email

2011-10-18 Thread Richard Porter
On 19 Oct 2011 Richard Porter  wrote:

> On 18 Oct 2011 Brian Bailey  wrote:

>>> OK. But an html message or web page shouldn't contain BMP images.

>> On what basis shouldn't it, please? It's the first time I've seen a BMP
>> file employed in this way. If this is likely to become a more common
>> procedure then surely NetSurf developers would wish to know, yes?

> I think that one's been answered for you. If you want to be sure that
> the majority of browsers can display your images stick to GIF, JPEG
> and PNG. I now realise that NetSurf does render BMPs so I don't know
> why it doesn't like yours.

I've now read the explanation!

-- 
Richard Porterhttp://www.minijem.plus.com/
  mailto:r...@minijem.plus.com
I don't want a "user experience" - I just want stuff that works.



Re: puzzling email

2011-10-18 Thread Richard Porter
On 18 Oct 2011 Brian Bailey  wrote:

>> OK. But an html message or web page shouldn't contain BMP images.

> On what basis shouldn't it, please? It's the first time I've seen a BMP
> file employed in this way. If this is likely to become a more common
> procedure then surely NetSurf developers would wish to know, yes?

I think that one's been answered for you. If you want to be sure that 
the majority of browsers can display your images stick to GIF, JPEG 
and PNG. I now realise that NetSurf does render BMPs so I don't know 
why it doesn't like yours.

-- 
Richard Porterhttp://www.minijem.plus.com/
  mailto:r...@minijem.plus.com
I don't want a "user experience" - I just want stuff that works.



Re: puzzling email

2011-10-18 Thread Chris Young
On Tue, 18 Oct 2011 22:35:12 +0100, David J. Ruck wrote:

> On 18/10/2011 19:46, Chris Young wrote:
> > On Tue, 18 Oct 2011 09:43:01 +0100, John-Mark Bell wrote:
> >
> >> What is happening is that Pluto fails to rewrite the image reference in
> >> the HTML document, so NetSurf attempts to fetch a file that doesn't
> >> exist, and instead builds an error page, which then generates the
> >> BadType report.
> >
> > Should NetSurf perhaps be returning a "bad image" image instead of an
> > HTML error, if the request which causes the error to be generated was
> > expecting an object of type image/* ?
> 
> But if I understand the problem correctly, what is happening here is 
> that with ImageFS active the file ADFS::$.Somewhere.Image/BMP is no 
> longer a file, but a directory containing an sprite file. Therefore 
> NetSurf isn't just getting a broken link or bad image format, but is 
> being given a URL of a directory which is invalid HTML.

I was referring to the case where ImageFS wasn't being used, and
NetSurf was legitimately reading corrupt or missing files.  If you are
running patches that transpose files into directories containing other
files, then quite frankly I'm surprised it works at all.

Chris



Re: puzzling email

2011-10-18 Thread David J. Ruck

On 18/10/2011 19:46, Chris Young wrote:

On Tue, 18 Oct 2011 09:43:01 +0100, John-Mark Bell wrote:


What is happening is that Pluto fails to rewrite the image reference in
the HTML document, so NetSurf attempts to fetch a file that doesn't
exist, and instead builds an error page, which then generates the
BadType report.


Should NetSurf perhaps be returning a "bad image" image instead of an
HTML error, if the request which causes the error to be generated was
expecting an object of type image/* ?


But if I understand the problem correctly, what is happening here is 
that with ImageFS active the file ADFS::$.Somewhere.Image/BMP is no 
longer a file, but a directory containing an sprite file. Therefore 
NetSurf isn't just getting a broken link or bad image format, but is 
being given a URL of a directory which is invalid HTML.


Cheers
---David
--
Email: dr...@druck.org.uk
Phone: +44-(0)7974 108301





Re: puzzling email

2011-10-18 Thread Chris Young
On Tue, 18 Oct 2011 09:43:01 +0100, John-Mark Bell wrote:

> What is happening is that Pluto fails to rewrite the image reference in
> the HTML document, so NetSurf attempts to fetch a file that doesn't
> exist, and instead builds an error page, which then generates the
> BadType report.

Should NetSurf perhaps be returning a "bad image" image instead of an
HTML error, if the request which causes the error to be generated was
expecting an object of type image/* ?

The same goes for web-hosted images and other objects which can't be
decoded or handled.  Currently we show any ALT text, but a broken
image/unhandled content icon as well might make things a bit more
intuitive for the user.

Chris



Re: puzzling email

2011-10-18 Thread Brian Bailey
[biggish snip}



> > Not my problem. It was commercial, thus drawing my attention to the
> > event.

> Would there be any point in telling a suit that he's sending out files in
> formats he /perhaps/ shouldn't? Only if you can tell him he's losing
> potential sales.

Well, in a round about way he was losing potential sales, but not for that
reason. I had long ago decided that his product was a total pain. 8-)

> Unfortunately there is no easy way (under RISC OS) to reliably create
> html attachments with embedded images which work in Pluto/NetSurf,
> without wrapping them up in a zip file. Merely attaching a web page and
> its images to a message doesn't work: the links in the HTML have to be
> correctly written and this is done by windoze and other software if it's
> used correctly. I suspect simple attachments were attempted by the
> sender.

> Not NetSurf's fault. Sorry for long post.

No worries, Tim. All grist to the mill.




Re: puzzling email

2011-10-18 Thread Brian Bailey
In article <52240dc1act...@netsurf-browser.org>,
   Michael Drake  wrote:
> In article <522408c273bbai...@argonet.co.uk>,
>Brian Bailey  wrote:


> > > OK. So this has nothing to do with BMP images at all. The bitmap you
> > > sent me renders fine here.

> > It does here as well, in retrospect, in ChangeFSI, but originally I had
> > no reason to do it that way.

> John-Mark meant it renders fine in NetSurf, which has its own routines
> for BMP decoding[1].

I was unaware of that. It would seem that applied to others, too. 

> Whatever ChangeFSI does is not going to affect NetSurf.

I never thought that it would. That was a discrete exercise in itself.

> [1] http://www.netsurf-browser.org/projects/libnsbmp/




Re: puzzling email

2011-10-18 Thread Vince M Hudd
John-Mark Bell  wrote:
> On Tue, 2011-10-18 at 07:37 +0100, Brian Bailey wrote:

[HTML from an email renders without the BMP graphic]

> OK. So this has nothing to do with BMP images at all. The bitmap you sent
> me renders fine here.
 
> What is happening is that Pluto fails to rewrite the image reference in
> the HTML document, so NetSurf attempts to fetch a file that doesn't exist,
> and instead builds an error page, which then generates the BadType report.

It's a long time since I used Pluto, but my recollection is that it doesn't
treat HTML attachments any differently to any other type of attachment: You
double click on it, a temporary copy is saved and that's filer_run.

It doesn't parse the HTML in any way to see if any other attached files are
needed by it, so they aren't saved alongside it - and therefore, as you say,
the images references aren't rewritten.

The bottom line, for users of Pluto, is that if you want to see attached
images displayed in the HTML, you'll need to save and manually edit. (Remote
images should be fine, of course).

-- 
Soft Rock Software:   http://www.softrock.co.uk
Vince M Hudd: http://misc.vinceh.com/about-vinceh/
RISCOSitory:  http://www.riscository.com



Re: Netsurf saving a BMP object.

2011-10-18 Thread cj
In article <8889162452.pitt...@iyonix.home>,
   David Pitt  wrote:
> Should this be so? Should this be in MimeMap by default? Could it
> have been a factor in the "puzzling email" thread confusing Pluto?

No idea, but I do have the following in my mimemap file (not that I
put it there myself)

image/x-ms-bmp  BMP 69c .bmp .dib .vga
image/x-rle BMP 69c .rle .rl4 .rl8

-- 
Chris Johnson



Re: Netsurf saving a BMP object.

2011-10-18 Thread David Pitt
In message <522417ee9djoh...@ukgateway.net>
  John Williams  wrote:

> In article <8889162452.pitt...@iyonix.home>,
>David Pitt  wrote:

>> This line added to MimeMap did allow NetSurf to save the BMP as a BMP.

>> image/bmp  BMP  69C .bmp

> I already have:

> image/x-MS-bmp  BMP 69C .bmp
> image/x-bitmap  XBitMap b61 .bm
> image/x-ms-bmp  BMP 69c .bmp
> image/x-xbitmap XBitMap b61 .bm

I already had those on OS5.17 but only the first on OS4.04.

However having now fed the brain some lunch I see that OS4.39 already 
has an entry for 'image/png' and consequently does save correctly.

Doing a 'wget' on the bmp does show it to be described as [image.bmp]. 
I suppose the local MimeMap needs to reflect what the Apache web 
server is serving, not a subject I fully understand.

Anyway Q.E.D. I think.

-- 
David Pitt

MessengerPro 6 on an ARMini running RISC OS 5



Re: Netsurf saving a BMP object.

2011-10-18 Thread John Williams
In article <8889162452.pitt...@iyonix.home>,
   David Pitt  wrote:

> This line added to MimeMap did allow NetSurf to save the BMP as a BMP.

> image/bmp  BMP  69C .bmp

I already have:

image/x-MS-bmp  BMP 69C .bmp
image/x-bitmap  XBitMap b61 .bm
image/x-ms-bmp  BMP 69c .bmp
image/x-xbitmap XBitMap b61 .bm

John




Netsurf saving a BMP object.

2011-10-18 Thread David Pitt
A cheery hand wave to one and all (mostly).

Using NetSurf r13069.

Having got embroiled in a recent thread it did not take too long to 
find the NetSurf is OK with BMP objects. (Whether it is a sensible 
thing to do is another matter.)

http://www.pittdj.co.uk/tmp/fergus.htm

The oddity occurs on trying to save the object, NetSurf filetyped the 
save as 'Data'. (Oregano and Oregano2 failed to display the BMP but 
did save it correctly typed.)

This line added to MimeMap did allow NetSurf to save the BMP as a BMP.

image/bmp  BMP  69C .bmp

Should this be so? Should this be in MimeMap by default? Could it have 
been a factor in the "puzzling email" thread confusing Pluto?

-- 
David Pitt

MessengerPro 6 on an ARMini running RISC OS 5



Re: puzzling email

2011-10-18 Thread David J. Ruck

On 18/10/2011 11:25, John Harrison wrote:



... NetSurf, which has its own routines for BMP decoding[1].  Whatever
ChangeFSI does is not going to affect NetSurf.


However, the test that I did showed that with ImageFS2 running on the
machine, its settings did affect what NetSurf did.

I don't know enough about the mechanics to know whether would or would not
be expected.


It is expected as ImageFS fundamentally affects the way foreign image 
files on disc are handled by applications.


Without ImageFS, it is up to the individual application to decide if it 
can handle a foreign image file type, and then attempt to render it 
using its own code.


With ImageFS, the application does not see a foreign image file, but a 
directory containing a sprite. When it loads this sprite ImageFS will 
attempt to convert the foreign format to a sprite, which the application 
can render using standard OS routines.


In this case Pluto is saving the HTML and a BMP file from an email to a 
temporary directory, and NetSurf will attempt to load it when rendering 
the HTML. If ImageFS is active it will bypass NetSurfs BMP handling.


Cheers
--
David J. Ruck
email: dr...@druck.org.uk
phone: +44(0)7974 108301



Re: puzzling email

2011-10-18 Thread Tim Hill
In article <5223f8af84bbai...@argonet.co.uk>, Brian Bailey
 wrote:


> > > I ran the html file which was with the message, which appears as an
> > > attchment, in !Pluto, in NetSurf. The BMP file was also an
> > > attachment to the message. NetSurf tried to load the file. End of.

> > OK. But an html message or web page shouldn't contain BMP images. 

> On what basis shouldn't it, please? It's the first time I've seen a BMP
> file employed in this way. If this is likely to become a more common
> procedure then surely NetSurf developers would wish to know, yes?

Like an Acorn Sprite, a BMP is an /uncompressed/ proprietary format so it
is bad form to use them in web pages or in html emails. BMPs do work
though, as every browser seems to be able to render them. Usually. Some
web counters, for example, do use the BMP format but those are usually
tiny files which arguably don't matter so much.

http://www.htmlgoodies.com/tutorials/web_graphics/article.php/3479931/Image-Formats.htm

Perhaps in the hiatus caused by compuserve's proprietary stance about
GIFs, and before PNGs were widespread, some people in fear of being sued
for using GIF may have turned to BMP instead (they are most likely using
windoze, after all). Sometimes they would have been better than 'the
other choice': there is little worse than somebody using a heavily
compressed JPEG for a graphic. Such as this:

http://openads.webmarketingpublications.co.uk/www/delivery/ai.php?filename=stage_photography.jpg&contenttype=jpeg

Blow that up and compare it to their graphic here:

http://openads.webmarketingpublications.co.uk/www/delivery/ck.php?n=0ddb8d1

It would seem that one web advertising company applies terrible lossy
compression to the ad you send them and makes your images look horrible.

TBH it often doesn't really matter if BMPs are used unless fools send
huge uncompressed photos in this way. You could be looking at a 30MB
instead of a 0.5MB download but generally its nothing to get worked up
about!

> > I expect that Internet Explorer might open them, but then it'll
> > handle URLs containing backslashes. So the problem lies with whatever
> > lump of shit (Outlook Express?) sent the message. I'm not surprised
> > that NetSurf barfed at it.

If it was an HTML email then presumably the software simply embedded the
image the user threw at it. Hardly the program's fault, or do you expect
email software to process image file format translation to cope for
people who don't know the 'rules' better?  ;-)

> > Your correspondent could do with a little education too.

As could many Windoze Lusers. About everything.  ;-D

> Not my problem. It was commercial, thus drawing my attention to the
> event.

Would there be any point in telling a suit that he's sending out files in
formats he /perhaps/ shouldn't? Only if you can tell him he's losing
potential sales.

Unfortunately there is no easy way (under RISC OS) to reliably create
html attachments with embedded images which work in Pluto/NetSurf,
without wrapping them up in a zip file. Merely attaching a web page and
its images to a message doesn't work: the links in the HTML have to be
correctly written and this is done by windoze and other software if it's
used correctly. I suspect simple attachments were attempted by the sender.

Not NetSurf's fault. Sorry for long post.

-- 
Tim Hill
..
www.timil.com




Re: puzzling email

2011-10-18 Thread Michael Drake
In article <52240e39c2j...@jaharrison.me.uk>,
   John Harrison  wrote:

> > ... NetSurf, which has its own routines for BMP decoding[1].  Whatever
> > ChangeFSI does is not going to affect NetSurf.

> However, the test that I did showed that with ImageFS2 running on the
> machine, its settings did affect what NetSurf did.

If I remember correctly ImageFS2 transparently interferes somehow,
converting other formats to Sprite before they get to the target
application.  So if you turn ImageFS2 on for BMP files perhaps NetSurf is
getting given Sprite data but still trying to deal with it with its BMP
handler instead of the Sprite handler.

-- 

Michael Drake (tlsa)  http://www.netsurf-browser.org/



Re: puzzling email

2011-10-18 Thread John Harrison

> ... NetSurf, which has its own routines for BMP decoding[1].  Whatever
> ChangeFSI does is not going to affect NetSurf.

However, the test that I did showed that with ImageFS2 running on the
machine, its settings did affect what NetSurf did.

I don't know enough about the mechanics to know whether would or would not
be expected. 

Regards

-- 
John Harrison
Website http://jaharrison.me.uk



Re: puzzling email

2011-10-18 Thread Michael Drake
In article <522408c273bbai...@argonet.co.uk>,
   Brian Bailey  wrote:


> > OK. So this has nothing to do with BMP images at all. The bitmap you
> > sent me renders fine here.

> It does here as well, in retrospect, in ChangeFSI, but originally I had
> no reason to do it that way.

John-Mark meant it renders fine in NetSurf, which has its own routines for
BMP decoding[1].  Whatever ChangeFSI does is not going to affect NetSurf.

[1] http://www.netsurf-browser.org/projects/libnsbmp/

-- 

Michael Drake (tlsa)  http://www.netsurf-browser.org/



Re: puzzling email

2011-10-18 Thread Brian Bailey


> > > 3) Please email me both the HTML and BMP files in question
> > 
> > Wilco. Bit busy at the moment, but will get back to you.

> OK. So this has nothing to do with BMP images at all. The bitmap you
> sent me renders fine here.

It does here as well, in retrospect, in ChangeFSI, but originally I had no
reason to do it that way. I assumed that, never having seen a bmp file in
this context before, it shouldn't really have been there anyway.

> What is happening is that Pluto fails to rewrite the image reference in
> the HTML document, so NetSurf attempts to fetch a file that doesn't
> exist, and instead builds an error page, which then generates the
> BadType report.

Right. Well, that /is/ a bit fundamental, isn't it!

> This is not something that can be fixed in NetSurf as essentially the
> source document is wrong.

Understood.

Thanks,

Brian




Re: puzzling email

2011-10-18 Thread John-Mark Bell
On Tue, 2011-10-18 at 07:37 +0100, Brian Bailey wrote:

> > 3) Please email me both the HTML and BMP files in question
> 
> Wilco. Bit busy at the moment, but will get back to you.

OK. So this has nothing to do with BMP images at all. The bitmap you
sent me renders fine here.

What is happening is that Pluto fails to rewrite the image reference in
the HTML document, so NetSurf attempts to fetch a file that doesn't
exist, and instead builds an error page, which then generates the
BadType report.

This is not something that can be fixed in NetSurf as essentially the
source document is wrong.


John-Mark.