Bug 233784

Summary: improve file size for puzzles created with default slicers
Product: [Applications] palapeli Reporter: Stefan Majewsky <majewsky>
Component: generalAssignee: Stefan Majewsky <majewsky>
Status: RESOLVED FIXED    
Severity: wishlist CC: Ch.Ehrlicher, kde-games-bugs, simonandric5, stasnel
Priority: VHI    
Version: unspecified   
Target Milestone: 1.2   
Platform: Compiled Sources   
OS: Unspecified   
Latest Commit: Version Fixed In:
Bug Depends on:    
Bug Blocks: 211859    

Description Stefan Majewsky 2010-04-08 23:51:41 UTC
Version:            (using Devel)
Installed from:    Compiled sources

If a puzzle relies on a slicer which is shipped by default with Palapeli, the size of the puzzle can greatly be reduced by not including the piece images in the puzzle file, but only the base image and the slicer job description.

Action plan:
1. Puzzles can be compressed by removing the redundant information. This should preferably happen in a transparent way during export operations.
2. When Palapeli encounters a compressed puzzle file in its collection, it invokes the slicer automatically to inflate the puzzle. In the collection, the compressed puzzle is replaced by its uncompressed counterpart.
3. The default puzzles should be shipped in a compressed form.
Comment 1 Stefan Majewsky 2010-04-26 21:31:09 UTC
SVN commit 1119208 by majewsky:

Ugly hack for the default-puzzle-localisation problem. Because the feature freeze is upon us.

CCBUG: 233784

 M  +6 -1      README.PACKAGERS  
 M  +10 -5     puzzles/CMakeLists.txt  
 D             puzzles/castle-maintenon.puzzle  
 D             puzzles/cincinnati-bridge.puzzle  
 D             puzzles/citrus-fruits.puzzle  
 D             puzzles/european-honey-bee.puzzle  
 D             puzzles/make-puzzles.sh  
 D             puzzles/panther-chameleon-female.puzzle  
 M  +1 -0      src/CMakeLists.txt  
 A             src/firsttimehelper.cpp   [License: GPL (v2+)]
 A             src/firsttimehelper.h   [License: GPL (v2+)]
 M  +12 -1     src/main.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1119208
Comment 2 Stefan Majewsky 2010-05-25 00:27:14 UTC
Note to self: Generate a random seed when the puzzle is created, and use this random seed whenever the pieces are generated.
Comment 3 Christian Ehrlicher 2017-08-27 17:32:42 UTC
Afaic this was implemented already - only the image and the .desktop file is shipped and during the first start those puzzles are sliced and stored in a compresed .puzzle - file.