Why is it that Pano2VR sucks at compressing PNG files?

Q&A about the latest versions
Post Reply
User avatar
Carlos Chegado
Posts: 45
Joined: Wed Feb 14, 2007 7:11 pm

Fri Nov 06, 2020 2:13 am

G'Day,

I noticed that while Pano2VR is excellent at compressing JPEG images, when it comes to PNG files, it sucks big time.

For example, I have a Pano2VR project that uses a custom Tour Map which is a PNG file (image with transparent background).

That file is originally 119 KB.

When I generate the output, Pano2VR creates two versions of this file.

One named *_1.png is 1/4 the size of the original file (half width and half height) that is 113 KB

Another named *_2.png that is exactly the same width and height of the original file but weights 283 KB.

So the file that is exactly the same width and height of the original file is more than twice as heavy!

That is no good when we're all trying to optimize our content to load as fast as possible.

Any chance you guys can look at this please?

Cheers
User avatar
Tony
Posts: 999
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Fri Nov 06, 2020 5:31 am

Hi Carlos,

Can you post a sample of the png so I can do some testing?

cheers,

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: http://tonyredhead.com - http://redsquare.com | roundme: http://round.me/@tonyredhead | instagram: https://www.instagram.com/tonyredhead/
User avatar
Carlos Chegado
Posts: 45
Joined: Wed Feb 14, 2007 7:11 pm

Fri Nov 06, 2020 5:45 am

Hi Tony,

For sure, here's a sample PNG file: https://fil.email/JOUep8MT

This is the actual file I mention in this post.

Cheers
User avatar
Tony
Posts: 999
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Fri Nov 06, 2020 5:51 am

Got it
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: http://tonyredhead.com - http://redsquare.com | roundme: http://round.me/@tonyredhead | instagram: https://www.instagram.com/tonyredhead/
User avatar
Tony
Posts: 999
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Fri Nov 06, 2020 6:21 am

Hi Carlos,

Okay, did a quick test and in the Output/images/maptiles folder I have two png files; FloorPlan01_1.png 250 x 600px and FloorPlan02_2.png 500 x 1200px. The FloorPlan02_2.png is the same size as the original I downloaded from the forum.

peekpeek_2.jpg
peekpeek_2.jpg (572.8 KiB) Viewed 346 times

The weird thing though is the image shown in the panorama is only the lower res version, regardless of the size of the browser. I'm sure it should automatically show the larger version?

cheers,

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: http://tonyredhead.com - http://redsquare.com | roundme: http://round.me/@tonyredhead | instagram: https://www.instagram.com/tonyredhead/
User avatar
Tony
Posts: 999
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Fri Nov 06, 2020 6:53 am

Hi,

Interesting if you uncheck 'simple' map then it builds a tile version.

peekpeek_5.jpg
peekpeek_5.jpg (49.46 KiB) Viewed 345 times

Maybe Hopki can throw some light on the subject.

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: http://tonyredhead.com - http://redsquare.com | roundme: http://round.me/@tonyredhead | instagram: https://www.instagram.com/tonyredhead/
User avatar
Carlos Chegado
Posts: 45
Joined: Wed Feb 14, 2007 7:11 pm

Fri Nov 06, 2020 9:08 am

Hi Tony,

Maybe there's a bug in there somewhere!

The original file though is 118.67 KB
Pano2VR_PNG_file.JPG
Pano2VR_PNG_file.JPG (51.91 KiB) Viewed 336 times
You mention the original file is 291 KB but that's no my computer says!

Mr. Hopki must surely be able to enlighten us...

Cheers
User avatar
Tony
Posts: 999
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Fri Nov 06, 2020 10:49 am

Hi Carlos,

I ran it again and it matches your original post.

The download file is 122kb, the FloorPlan02_2.png is 290kb.

What happened was the original download png displayed on my desktop as a blank image (see below)

peekpeek_6.jpg
peekpeek_6.jpg (8.82 KiB) Viewed 330 times

So I opened it in Photoshop and resaved it, the resaved file was 290kb and this was the one I uploaded. I'm pretty sure the original png has been reduced in size using Export As from Photoshop or something like TinyPNG, the one I saved out of Photoshop and the one that Pano2VR converted are the same. If I take my 290kb version and save it out of Photoshop as 8 bit it's back to the original 122kb.

peekpeek_7.jpg
peekpeek_7.jpg (301.35 KiB) Viewed 330 times

So Pano2VR doesn't apply any reduction or maintain the reduction

cheers,

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: http://tonyredhead.com - http://redsquare.com | roundme: http://round.me/@tonyredhead | instagram: https://www.instagram.com/tonyredhead/
User avatar
Carlos Chegado
Posts: 45
Joined: Wed Feb 14, 2007 7:11 pm

Tue Nov 10, 2020 1:34 am

Hi Tony,

Thanks for confirming this issue for me.

Indeed the Gnomes have to clarify a few points:
  • Why is it that Pano2VR creates two versions of the Floor Plan but only the small one is presented in the tour making it look fuzzy when viewed on big desktop screens?
  • Why is it that Pano2VR doesn't optimize PNG files compression or at least maintain whatever compression it is provided by the users resulting in size overblown files that are regularly more than twice as big than properly compressed files?
  • If Pano2VR can't maintain the PNG file size compression why isn't there an option to use original file as is instead?
I think these are important questions and I'll be looking forward to hear back from the Gnomes regarding this.

Cheers
User avatar
Hopki
Gnome
Posts: 10859
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Tue Nov 10, 2020 2:56 pm

Hi Guys,
Pano2VR saves 24bit PNG, so if your image is 8bit then it will increase the file size, to this end a feature request has been added to use the original image with a simple floorplan.

Simple Floor plan.
Pano2VR looks at the image and creates one full size and one half its size until it gets close to 256px wide.
As an example, the lower deck resized to 1000 x 2400px will produce three images, looking at width, 1000px, 500px and 250px.
This is because we don't know what size you will make the map element in the skin.
So in this case, if the map element was 200px wide it will use the 250px image.
This does not take into account High DPI displays so a feature request has been added for this.

Simple deselected.
The Leaflet API tiles the floor plan image to 256px tiles.
Knowing this resizing the floor plan to 512 x 1536px will make it devisable by 256px.
in the skin make the map element 128 x 384px
With Initial Zoom set to "Marker bounds", it will open the floor plan in the lower right of the map element, this is wrong and a bug report is in for this.
But if you set to open with the correct level, 1, then it will open properly centred.
Now when you zoom out the smaller image will be centred.

Regards,
Hopki
Garden Gnome Software Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
Neal
Posts: 177
Joined: Thu Dec 12, 2013 11:14 am
Contact:

Wed Nov 11, 2020 4:16 am

Just a suggestion, instead of having Pano2VR decide for us, how about adding a bit selection. If you are doing drawings that are 2 or 3 flat colors, you don't need 24 bits.
Branigan
Posts: 228
Joined: Tue May 19, 2020 3:43 pm

Sat Nov 14, 2020 2:15 pm

If your image is a nice simple rectangle (not like the OP's boat example) use JPGs, where you can select the quality/compression.
Post Reply