Page 1 of 1

Why is it that Pano2VR sucks at compressing PNG files?

Posted: Fri Nov 06, 2020 2:13 am
by Carlos Chegado
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

Re: Why is it that Pano2VR sucks at compressing PNG files?

Posted: Fri Nov 06, 2020 5:31 am
by Tony
Hi Carlos,

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

cheers,

Tony

Re: Why is it that Pano2VR sucks at compressing PNG files?

Posted: Fri Nov 06, 2020 5:45 am
by Carlos Chegado
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

Re: Why is it that Pano2VR sucks at compressing PNG files?

Posted: Fri Nov 06, 2020 5:51 am
by Tony
Got it

Re: Why is it that Pano2VR sucks at compressing PNG files?

Posted: Fri Nov 06, 2020 6:21 am
by Tony
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 3693 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

Re: Why is it that Pano2VR sucks at compressing PNG files?

Posted: Fri Nov 06, 2020 6:53 am
by Tony
Hi,

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

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

Maybe Hopki can throw some light on the subject.

Tony

Re: Why is it that Pano2VR sucks at compressing PNG files?

Posted: Fri Nov 06, 2020 9:08 am
by Carlos Chegado
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 3683 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

Re: Why is it that Pano2VR sucks at compressing PNG files?

Posted: Fri Nov 06, 2020 10:49 am
by Tony
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 3677 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 3677 times

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

cheers,

Tony

Re: Why is it that Pano2VR sucks at compressing PNG files?

Posted: Tue Nov 10, 2020 1:34 am
by Carlos Chegado
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

Re: Why is it that Pano2VR sucks at compressing PNG files?

Posted: Tue Nov 10, 2020 2:56 pm
by Hopki
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,

Re: Why is it that Pano2VR sucks at compressing PNG files?

Posted: Wed Nov 11, 2020 4:16 am
by Neal
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.

Re: Why is it that Pano2VR sucks at compressing PNG files?

Posted: Sat Nov 14, 2020 2:15 pm
by Branigan
If your image is a nice simple rectangle (not like the OP's boat example) use JPGs, where you can select the quality/compression.

Re: Why is it that Pano2VR sucks at compressing PNG files?

Posted: Mon Feb 05, 2024 12:38 pm
by Hana
Carlos Chegado wrote: 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
I also using Pano2VR it is a great image compressing software I always prefer to use this but some time I also take help with some third party applications for compressing my jpeg, png etc with online application such as jpeg compressor it compress images without losing quality with supporting of file format.