Firefox Hates My Domesday Machine!

for all subjects/topics not covered by the other forum categories
Post Reply
User avatar
BeebMaster
Posts: 4671
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Firefox Hates My Domesday Machine!

Post by BeebMaster »

Never had anything like this before, Firefox isn't correctly displaying a JPG from my website when I load the page. The bottom quarter of the image is transparent, showing the window underneath the browser window:
Screenshot from 2021-11-02 13-45-32.png
Screenshot from 2021-11-02 13-50-28.png
But if I press F5 it draws it properly:
Screenshot from 2021-11-02 13-45-56.png
This only seems to happen on my (Ubuntu 20.04) Desktop PC, not the Ubuntu 18.?? laptop, Raspbian Pi4, or even RISC PC running !NetSurf! Anybody else have something like this happening with any other OS or browser (or even the same)?
Image
User avatar
baz4096
Posts: 245
Joined: Sat Apr 10, 2021 3:51 pm
Location: Baildon, West Yorkshire
Contact:

Re: Firefox Hates My Domesday Machine!

Post by baz4096 »

It could be a malformed jpg perhaps? I ran your existing image through an image optimiser, which dropped a hundred kb off the file size. See if that helps?

Your original worked fine for me in Chrome on macOS.
Attachments
Domesday2021-1big.jpg
User avatar
BeebMaster
Posts: 4671
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: Firefox Hates My Domesday Machine!

Post by BeebMaster »

Not sure, I've more or less automated photo processing for my website now, so the only thing that happens to the cropped camera image is this script which I point at the images:

Code: Select all

#!/bin/bash

exec 2>>/tmp/debug.output
set -x

for i in "$@"
do
  convert -quality 85 "$i" "${i%.*}big.${i##*.}"
  convert -resize 200x100000 "$i" "$i"
done
But what could cause the part of the page where the image isn't being displayed to appear as a "hole" rather than a solid colour or the background image?
Image
User avatar
IanJeffray
Posts: 1928
Joined: Sat Jun 06, 2020 3:50 pm
Location: Scotland
Contact:

Re: Firefox Hates My Domesday Machine!

Post by IanJeffray »

Ok on Firefox on Windows here. Can't see anything wrong with the image or the page. But FWIW, your imagemap seems a bit odd... only a small area in the upper-right corner is napped... coords="0,0,75,75" - intentional oddness?

Rookie photographer's mistake of leaving his lens cap in shot though :lol:
User avatar
BeebMaster
Posts: 4671
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: Firefox Hates My Domesday Machine!

Post by BeebMaster »

Yes, that's so you can get it full-size if you click top-left (which does display correctly here, it's only when it's part of that page that it makes a whole in the bottom quarter.)
Image
User avatar
tricky
Posts: 5885
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: Firefox Hates My Domesday Machine!

Post by tricky »

I haven't tried your image, but for a few weeks I've been getting large black sections on large .PNG files on Firefox on Windows. If I f5, what is visible is fine and a little distance of screen, but scrolling soon reveals more black. It seems to be loading just the visible but and some around the edges. Is seems to be a pixel area thing as the same width but shorter loads the full image where the larger one has side and bottom missing.
It is fine in all image programmes tried Inc psp5 and other browsers.
If I zoom out, the whole image is visible.
User avatar
BeebMaster
Posts: 4671
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: Firefox Hates My Domesday Machine!

Post by BeebMaster »

The only other thing I can think of is that I used a different camera setting to take that picture which I hadn't used before. I meant to turn the dial to manual, but went a notch too far and it went to one of the pre-sets for a night scene. It takes 4 shots and then combines them somehow to give a single photo. But if it displays OK elsewhere, I still can't fathom why Firefox on one machine doesn't like it!
Image
User avatar
Richard Russell
Posts: 2625
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: Firefox Hates My Domesday Machine!

Post by Richard Russell »

BeebMaster wrote:
Wed Nov 03, 2021 9:34 am
But if it displays OK elsewhere, I still can't fathom why Firefox on one machine doesn't like it!
If it's not Firefox and it's not the image itself, my suspicion would land on the low-level graphics drivers for your particular video card (nVidia or whatever). It might be worth investigating whether newer drivers are available from the manufacturer's site.
I am suffering from 'cognitive decline' and depression. If you have a comment about the style or tone of this message please report it to the moderators by clicking the exclamation mark icon, rather than complaining on the public forum.
User avatar
baz4096
Posts: 245
Joined: Sat Apr 10, 2021 3:51 pm
Location: Baildon, West Yorkshire
Contact:

Re: Firefox Hates My Domesday Machine!

Post by baz4096 »

It's possible to disable GPU rendering in Firefox, which would help identify, as Richard mentioned above, a driver issue:
Attachments
Screenshot 2021-11-03 at 16.58.14.png
User avatar
BeebMaster
Posts: 4671
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: Firefox Hates My Domesday Machine!

Post by BeebMaster »

Ewww, look what I found. Allow my computer to decide for itself what it thinks I want? How could I let that happen!!
Screenshot from 2021-11-03 17-10-43.png
Image
User avatar
BeebMaster
Posts: 4671
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: Firefox Hates My Domesday Machine!

Post by BeebMaster »

If anything, it's worse with hardware acceleration off, but I don't get exactly the same behaviour every time. Starting to scroll is now showing the remainder of the picture, which wasn't visible when the page loaded, as a transparent hole. Sometimes scrolling back to the top shows about the first inch of the picture as a transparent hole.

This sounds a bit like the experience Tricky mentioned.

I wonder if it's anything to do with the picture orientation. I took the photograph with the camera rotated 90 degrees for "portrait" rather than "landscape" frame, then rotated and cropped it in software (GThumb).
Image
User avatar
BeebMaster
Posts: 4671
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: Firefox Hates My Domesday Machine!

Post by BeebMaster »

Ubuntu offered me a Firefox update, so I did it, and the problem has gone away!

I am now on 94.0. The only relevant thing I can see in the list of fixes is
Those Mozilla brainboxes wrote:And we’ve improved pageload (especially with Site Isolation mode) by setting a higher priority for loading and displaying images.
Image
User avatar
BeebMaster
Posts: 4671
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: Firefox Hates My Domesday Machine!

Post by BeebMaster »

Didn't last long, today Firefox has found a new way to really hate my Domesday Machine! It's decided to increase the brightness of screenshots by about 1000 levels. A sample PNG is attached. Here's what is should look like in a picture viewer:
Screenshot from 2021-11-24 23-11-47.png
Here's what Firefox does to it:
Screenshot from 2021-11-24 23-12-17.png
What's going on?
Attachments
Domesday2021-43big.png
Image
User avatar
baz4096
Posts: 245
Joined: Sat Apr 10, 2021 3:51 pm
Location: Baildon, West Yorkshire
Contact:

Re: Firefox Hates My Domesday Machine!

Post by baz4096 »

This is one of those weird optical illusions!

I took your first screenshot from your picture viewer, and flood filled the background in black to get this:
Screenshot from 2021-11-24 23-11-47.png
If you look at the thumbnails along the bottom, you have two screenshots that are significantly lighter than the 11 either side of them. I'd take a look at your capture settings? Perhaps the brightness setting has been altered for those.
User avatar
BeebMaster
Posts: 4671
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: Firefox Hates My Domesday Machine!

Post by BeebMaster »

Something weird is going on. The pictures are very bright on NetSurf on my RISC PC, so it isn't Firefox this time.

Possibly the relative brightness against the other screenshots is due to a different capture method (new DVD recorder) but actually it looks like convert/imagemagick is doing something weird when I process the captures. The original capture image and the processed image look identical in a picture viewer, but the processed image in a web browser is horrifically brighter than the original. Here's the original:
Domesday2021-43.png
And processed using this script:

Code: Select all

#!/bin/bash

exec 2>>/tmp/debug.output
set -x

for i in "$@"
do
  convert -quality 85 "$i" "${i%.*}big.${i##*.}"
  convert -resize 200x100000 "$i" "$i"
done
Domesday2021-43big.png
Image
User avatar
baz4096
Posts: 245
Joined: Sat Apr 10, 2021 3:51 pm
Location: Baildon, West Yorkshire
Contact:

Re: Firefox Hates My Domesday Machine!

Post by baz4096 »

Could it be an embedded colour profile issue?

What do you get if you use

Code: Select all

identify -verbose
on the source and output files?
paulb
Posts: 860
Joined: Mon Jan 20, 2014 9:02 pm
Contact:

Re: Firefox Hates My Domesday Machine!

Post by paulb »

baz4096 wrote:
Thu Nov 25, 2021 12:04 am
Could it be an embedded colour profile issue?
Or even some transparency/alpha level?
User avatar
BeebMaster
Posts: 4671
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: Firefox Hates My Domesday Machine!

Post by BeebMaster »

Right, so using convert without any settings eg:

Code: Select all

convert  Domesday2021-43.png D43-Nosetting.png
still gives the output image with horrific brightness in web browsers, but still looks the same as the source file in image viewers

Here's identify for them both:

Code: Select all

identify -verbose Domesday2021-43.png D43-Nosetting.png
Image: Domesday2021-43.png
  Format: PNG (Portable Network Graphics)
  Mime type: image/png
  Class: DirectClass
  Geometry: 720x576+0+0
  Resolution: 16x15
  Print size: 45x38.4
  Units: Undefined
  Colorspace: RGB
  Type: TrueColor
  Base type: Undefined
  Endianess: Undefined
  Depth: 8-bit
  Channel depth:
    red: 8-bit
    green: 8-bit
    blue: 8-bit
  Channel statistics:
    Pixels: 414720
    Red:
      min: 0  (0)
      max: 255 (1)
      mean: 39.442 (0.154675)
      standard deviation: 22.5272 (0.0883419)
      kurtosis: 76.4752
      skewness: 8.64662
      entropy: 0.32357
    Green:
      min: 0  (0)
      max: 255 (1)
      mean: 40.9124 (0.160441)
      standard deviation: 22.8705 (0.0896883)
      kurtosis: 76.0581
      skewness: 8.62698
      entropy: 0.234745
    Blue:
      min: 0  (0)
      max: 255 (1)
      mean: 35.9737 (0.141073)
      standard deviation: 22.7678 (0.0892855)
      kurtosis: 76.7183
      skewness: 8.67967
      entropy: 0.246887
  Image statistics:
    Overall:
      min: 0  (0)
      max: 255 (1)
      mean: 38.776 (0.152063)
      standard deviation: 22.7218 (0.0891052)
      kurtosis: 75.1701
      skewness: 8.54482
      entropy: 0.268401
  Rendering intent: Undefined
  Gamma: 1
  Background color: rgb(255,255,255)
  Border color: rgb(223,223,223)
  Matte color: rgb(189,189,189)
  Transparent color: rgb(0,0,0)
  Interlace: None
  Intensity: Undefined
  Compose: Over
  Page geometry: 720x576+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Zip
  Orientation: Undefined
  Properties:
    date:create: 2021-11-24T22:55:52+00:00
    date:modify: 2021-11-22T01:05:34+00:00
    png:cHRM: chunk was found (see Chromaticity, above)
    png:gAMA: gamma=0.35714 (See Gamma, above)
    png:IHDR.bit-depth-orig: 8
    png:IHDR.bit_depth: 8
    png:IHDR.color-type-orig: 2
    png:IHDR.color_type: 2 (Truecolor)
    png:IHDR.interlace_method: 0 (Not interlaced)
    png:IHDR.width,height: 720, 576
    png:pHYs: x_res=16, y_res=15, units=0
    signature: 9302334a8e69408f1dbe7445997f9f592ea5d481f6d87a8f011e09f8037ef0ca
  Artifacts:
    filename: Domesday2021-43.png
    verbose: true
  Tainted: False
  Filesize: 97931B
  Number pixels: 414720
  Pixels per second: 41.472MB
  User time: 0.000u
  Elapsed time: 0:01.010
  Version: ImageMagick 6.9.10-23 Q16 x86_64 20190101 https://imagemagick.org
Image: D43-Nosetting.png
  Format: PNG (Portable Network Graphics)
  Mime type: image/png
  Class: DirectClass
  Geometry: 720x576+0+0
  Resolution: 16x15
  Print size: 45x38.4
  Units: Undefined
  Colorspace: RGB
  Type: TrueColor
  Base type: Undefined
  Endianess: Undefined
  Depth: 8-bit
  Channel depth:
    red: 8-bit
    green: 8-bit
    blue: 8-bit
  Channel statistics:
    Pixels: 414720
    Red:
      min: 0  (0)
      max: 255 (1)
      mean: 39.442 (0.154675)
      standard deviation: 22.5272 (0.0883419)
      kurtosis: 76.4752
      skewness: 8.64662
      entropy: 0.32357
    Green:
      min: 0  (0)
      max: 255 (1)
      mean: 40.9124 (0.160441)
      standard deviation: 22.8705 (0.0896883)
      kurtosis: 76.0581
      skewness: 8.62698
      entropy: 0.234745
    Blue:
      min: 0  (0)
      max: 255 (1)
      mean: 35.9737 (0.141073)
      standard deviation: 22.7678 (0.0892855)
      kurtosis: 76.7183
      skewness: 8.67967
      entropy: 0.246887
  Image statistics:
    Overall:
      min: 0  (0)
      max: 255 (1)
      mean: 38.776 (0.152063)
      standard deviation: 22.7218 (0.0891052)
      kurtosis: 75.1701
      skewness: 8.54482
      entropy: 0.268401
  Rendering intent: Undefined
  Gamma: 1
  Background color: rgb(255,255,255)
  Border color: rgb(223,223,223)
  Matte color: rgb(189,189,189)
  Transparent color: rgb(0,0,0)
  Interlace: None
  Intensity: Rec709Luminance
  Compose: Over
  Page geometry: 720x576+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Zip
  Orientation: Undefined
  Properties:
    date:create: 2021-11-25T00:08:16+00:00
    date:modify: 2021-11-25T00:08:16+00:00
    png:bKGD: chunk was found (see Background color, above)
    png:gAMA: gamma=1 (See Gamma, above)
    png:IHDR.bit-depth-orig: 8
    png:IHDR.bit_depth: 8
    png:IHDR.color-type-orig: 2
    png:IHDR.color_type: 2 (Truecolor)
    png:IHDR.interlace_method: 0 (Not interlaced)
    png:IHDR.width,height: 720, 576
    png:pHYs: x_res=16, y_res=15, units=0
    png:text: 2 tEXt/zTXt/iTXt chunks were found
    signature: 9302334a8e69408f1dbe7445997f9f592ea5d481f6d87a8f011e09f8037ef0ca
  Artifacts:
    filename: D43-Nosetting.png
    verbose: true
  Tainted: False
  Filesize: 102022B
  Number pixels: 414720
  Pixels per second: 41.472MB
  User time: 0.060u
  Elapsed time: 0:01.010
  Version: ImageMagick 6.9.10-23 Q16 x86_64 20190101 https://imagemagick.org
Image
User avatar
BeebMaster
Posts: 4671
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: Firefox Hates My Domesday Machine!

Post by BeebMaster »

I installed pngquant as a test and did

Code: Select all

pngquant Domesday2021-43.png -ext D43-pnquant.png
Output file seems to work, so it looks like I'm looking for a replacement for convert which has let me down very badly on the eve of the big Domesday birthday. I don't think pngquant can resize.
Domesday2021-43D43-pnquant.png
Image
User avatar
BeebMaster
Posts: 4671
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: Firefox Hates My Domesday Machine!

Post by BeebMaster »

Looks like graphicsmagick is going to be my new friend!
Image
User avatar
baz4096
Posts: 245
Joined: Sat Apr 10, 2021 3:51 pm
Location: Baildon, West Yorkshire
Contact:

Re: Firefox Hates My Domesday Machine!

Post by baz4096 »

Seems like convert was modifying a couple of the png properties:
Luminance and gamma, which were probwbly ignored by the photo viewer but not Firefox. It might have been trying to fix the image by placing default values in the undefined field, and the gamma is mentioned elsewhere in both file as ‘1’. Just guessing now, hopefully your new tool behaves better.
Attachments
7DC38F62-6B75-4534-80E4-E6C20A20E6C0.jpeg
User avatar
BeebMaster
Posts: 4671
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: Firefox Hates My Domesday Machine!

Post by BeebMaster »

I noticed the luminance difference, I wonder why it wanted to do that. It's been an audio-visual disaster round here this week! First it was the new DVD recorder getting stuck on playback of the final frame of some recordings, filling up the DVD with an hour of the same frame (solved that by editing the recording and splitting the title into two, cutting out the last couple of seconds into a new title, so I always need to remember to record about an extra 5 seconds at the end of each recording just in case!), then the VCR started giving out buzzing noises on the audio after I put tape 2 of "The Sea Devils" in, looks like the Hi-Fi on the VCR it is dying so I have to use "normal" audio now with no Hi-Fi, and then all this business!

Graphicsmagick seems OK in limited testing, as the name implies it seems to originally derive from imagemagick and it has the same command line options pretty much. Just have to prefix the command line switches with what function you want it to do, e.g. "convert" - so in fact, all I should need to do to amend my little script is put "gm" at the front of the existing lines.
Image
User avatar
BeebMaster
Posts: 4671
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: Firefox Hates My Domesday Machine!

Post by BeebMaster »

Changed the script to use gm instead of convert, and all that was needed was to put "gm" before the original convert lines. Here's gm's processed picture:
Domesday2021-43big.png
Image
Post Reply

Return to “off-topic”