WnSoft Forums: BMP VS PNG - WnSoft Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

BMP VS PNG What will be the best to use with V5 ?

#1 User is offline   JPD 

  • Advanced Member
  • PipPipPipPipPip
  • Group: Members
  • Posts: 732
  • Joined: 27-October 03
  • Gender:Male
  • Location:Champs sur Marne France
  • Interests:Tout ce que concerne l'utilisation d'images et de son

Posted 21 February 2006 - 08:37 PM

In the future version of PTE, we will have the choice between PNG and BMP 32 bits for semi-transparency images.

I did some tests in order to see which format is more interesting :
For photographies, PNG is smaller and the PGN zip is also smaller than a BMP zipped (BMP is 230% bigger and 150% bigger when zipped for the tests I did)

For titles and draws, the BMP files, in my tests were 680% bigger than the sames files in PNG, but when both were zipped, the BMP is smaller than the PNG ! (-35%)

Generally, what we need is to have the smallest file for the net and we zip our files, on the hard disk it's not very important to have 10 or 20 Mo, so I think that for title were we need semi-transparency, BMP 32 bits will be better than PNG.

Another important point : the 32 bits BMP files are very quick to be calculated by the actual PTE and it will be probably the same in the next version. Igor wrote somewhere that for PNG it will be necessary to have enough time. It's a second reason to use the BMP format for titles, draw, map which need transparency.

I did a little slideshow using only 32 bits BMP in order to see what we can do with this file and to see that PTE is very quick with them. It's here and talk about Igor's camera :-)))

You'll find here the avi file, it's of course quicker than the exe file, but it is an unusually use of PTE, it's only a test of BMP files with PTE.
0

#2 User is offline   tom95521 

  • Advanced Member
  • PipPipPipPipPip
  • Group: Moderator
  • Posts: 946
  • Joined: 15-February 05
  • Gender:Male
  • Location:Arcata, California

Posted 22 February 2006 - 04:57 AM

Very interesting. Reading Igor's previous post I thought that zipping a .exe would not provide much more compression. I guess the aspack compression % is relative to the graphics file format used.

http://www.picturestoexe.com/forums/index....578&#entry25578

JPEG vs. PNG will also be an interesting benchmark. If the background image has areas of solid color and if you are planning to zoom > 100% it will probably be better to use PNG. JPEG color subsampling is noticeable at higher zoom % and I think PNG has little to no compression artifacting (from my experiments with PBS). My guess is that JPEG will be less popular in p2e ver. 5 for digital cameras that are capable of shooting in RAW/TIFF.

tom
0

#3 User is offline   JPD 

  • Advanced Member
  • PipPipPipPipPip
  • Group: Members
  • Posts: 732
  • Joined: 27-October 03
  • Gender:Male
  • Location:Champs sur Marne France
  • Interests:Tout ce que concerne l'utilisation d'images et de son

Posted 22 February 2006 - 06:56 AM

Quote

JPEG vs. PNG will also be an interesting benchmark

I also did some test about JPG :

On a photo take by Hubble : 3761 x 2821 pixels.
JPG Q=9 (Photoshop) : 1864 Ko, 1852 Ko when zipped
JPG Q=12 (Photoshop) : 4577 Ko, 4447 Ko when zipped
PNG (24bits Photoshop with transparency) : 17560 Ko, 17560 Ko when zipped
BMP 32 bits with transparency : 41445Ko, 26360 Ko when zipped

On a draw (Diapositif's logo) : 400 x 400 :
JPG Q=9 (Photoshop) : 48 473 bytes, 34 227 bytes when zipped
JPG Q=12 (Photoshop) : 87 826 bytes, 70 683 bytes when zipped
PNG (24bits Photoshop with transparency) : 93 237 bytes, 92 688 bytes when zipped
BMP 32 bits with transparency : 640 054 bytes, 68 970 bytes when zipped

But it's difficult to compare JPG VS PNG, it's not at all the same thing, and with JPG, it depend of the picture and also of the tool (Photoshop is smaller in web function, and isn't always the best tool)

Quote

I guess the aspack compression % is relative to the graphics file format used.

Aspasck doesn't compress sound's and picture's files it's the reason for which the test with zip is right (it's a bit better with winrar).
Aspack is used for the program and maybe the data (I am not at all sure for the datas).
The only thing that I don't understand is why the number of Ko for datas in the exe file is bigger than the PTE file, it's the reason for which I am not at all sure.
For instance, in the slideshow about Hubble,
The exe file is 22 650 110 bytes :
- 254 996 bytes for the PTE's program ( only ! )
- 19 458 328 bytes for Pictures and sound (and some informations about them)
- 2 936 786 bytes for PTE datas and the crc
The PTE file is 2 579 233 bytes, smaller than it is in the exe file, and if I zip the PTE file it's only 43 013 bytes ! I never had any explanation about that. Perhaps Igor can answer.

NB When I zip the exe file the size is 10 879 186 bytes
Zip reduce of 11495 Ko, 11485 Ko for pictures and sound, only 10 Ko for program and datas (that mean that datas seams to be compress, it's another reason for which I don't understand)
0

#4 User is offline   Igor Kokarev 

  • Administrator
  • PipPipPipPipPip
  • Group: Admin
  • Posts: 3,579
  • Joined: 06-December 02

Posted 22 February 2006 - 07:11 AM

JPD
You're right, maybe it will more fast for loading of slides to add BMP32 and compress all EXE to ZIP archive. Overall file size will be maybe smaller that EXE with PNGs.

By the way, in case of simple text label with shadow (787x152) it has 45 KB in PNG format and 467 KB in BMP32 and 42 KB in ZIP archive with BMP32.

p.s. concerning EXE file size of that slide-show.
36 images - 18 821 19 bytes
3 sound files - 11 451 046 bytes
1 project file - 38 565
Total: 30 311 230 bytes

Final EXE file with (PTE engine - 254 464 bytes) = 30 564 774 bytes
Igor Kokarev, WnSoft Ltd. - wnsoft.com , Write a letter
0

#5 User is offline   JPD 

  • Advanced Member
  • PipPipPipPipPip
  • Group: Members
  • Posts: 732
  • Joined: 27-October 03
  • Gender:Male
  • Location:Champs sur Marne France
  • Interests:Tout ce que concerne l'utilisation d'images et de son

Posted 22 February 2006 - 10:24 AM

Igor, there is one thing that I don't understand :
The datas in the exe file seems to be compressed (if I take this part, winzip doesn't compress more), but the size is larger than those of the PTE file and if I zip the PTE file the compression rate is better than 98% in my exemple (2 579 233 bytes and 43 013 bytes in a zip).
Is there complementary program (I don't think so) in this part or something add to the datas to make them bigger than the PTE text file. I though than datas in an exe would be more compressed than data in a text file.
0

#6 User is offline   Igor Kokarev 

  • Administrator
  • PipPipPipPipPip
  • Group: Admin
  • Posts: 3,579
  • Joined: 06-December 02

Posted 22 February 2006 - 05:05 PM

PTE engine in EXE file already compressed.
Images and music in EXE file can be compressed.

For example, if you add BMP files and create EXE file, it will be well reduced after compression to ZIP archive. I checked this moment several times and all works as I expected.
Igor Kokarev, WnSoft Ltd. - wnsoft.com , Write a letter
0

#7 User is offline   JPD 

  • Advanced Member
  • PipPipPipPipPip
  • Group: Members
  • Posts: 732
  • Joined: 27-October 03
  • Gender:Male
  • Location:Champs sur Marne France
  • Interests:Tout ce que concerne l'utilisation d'images et de son

Posted 22 February 2006 - 05:41 PM

I agree with you for PTE engine, images and music, I just speak about the datas which are at the end of the exe file, my english isn't good and it's difficult to explain what I didn't understand.
It's only the size of the datas that seems be compressed because winzip is enable to do better for what is in the exe, but this part for the datas is bigger than the PTE text file, and when I zip the PTE text file, it is very small. That's what I don't understand.
0

#8 User is offline   Igor Kokarev 

  • Administrator
  • PipPipPipPipPip
  • Group: Admin
  • Posts: 3,579
  • Joined: 06-December 02

Posted 22 February 2006 - 05:52 PM

In v4.xx we convert project file to special format and you're right it's impossible to compress this data. Especially if you have 1 MB .pte project file.

But in v5.00 we will compress project file with ZIP like algorithm.
Igor Kokarev, WnSoft Ltd. - wnsoft.com , Write a letter
0

#9 User is offline   tom95521 

  • Advanced Member
  • PipPipPipPipPip
  • Group: Moderator
  • Posts: 946
  • Joined: 15-February 05
  • Gender:Male
  • Location:Arcata, California

Posted 22 February 2006 - 06:05 PM

I had forgotten that ver. 5 was going to have some type of zip archive. I hope the .pte can still be modified outside of the p2e visual editor. I wanted to experiment with object tweening/sprites. If not, maybe a p2e API will be available.

thanks,
tom
0

#10 User is offline   Igor Kokarev 

  • Administrator
  • PipPipPipPipPip
  • Group: Admin
  • Posts: 3,579
  • Joined: 06-December 02

Posted 22 February 2006 - 08:14 PM

Tom,
Don't worry, please! Of course, .pte project file will be open as usually. We will only compress project file embedded to EXE file which you never need to modify.
Igor Kokarev, WnSoft Ltd. - wnsoft.com , Write a letter
0

#11 User is offline   JPD 

  • Advanced Member
  • PipPipPipPipPip
  • Group: Members
  • Posts: 732
  • Joined: 27-October 03
  • Gender:Male
  • Location:Champs sur Marne France
  • Interests:Tout ce que concerne l'utilisation d'images et de son

Posted 22 February 2006 - 08:28 PM

I had the problem with my game "Taquin" where the data part was 3492 Ko when the zip of the PTE text was about 70 Ko. I spoke about that to Fanafot's webmaster and he told me it wasn't important, but for me it is, and it's a very good new you give us, many thanks Igor.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users