Moderator: Phades
Leny-m wrote:Right now, I'm comparing them pixel by pixel
But I haven't found any better way so far.
I still haven't found any good source code for extracting crc from png. That might be the way.
mvgulik wrote:...
Leny-m wrote:Pixel by pixel has 100 % results. Tried checksum with a bit worse results but it took the same amount of time.
And I can't really store any processed data. There still would be users who are trying to use my app for the first time on big amounts of data.
mvgulik wrote:True, if your processing two new sessions.
Using and storing those checksums is key to any potential major speedups. (will make it more complicated of course, and present its own set of potential problems.)
Just to give you a more practical example, here is what I do it. I store the checksum's in a database(SQLite) file inside the session map. And when merging two sessions I also merge the checksum data. That way I kinda eliminate the need to do more than one scan on any tile.
So if I got a big session that exist out of a lot of merged sessions ... I don't have to do any tile scanning anymore. Big time saver ... And kinda needed to maintain a general workable speed with big merged sessions.
On the used source date used for the checksum ... well, I used a full file scan, mainly because that was the easy way out. But try to switch to real image data to make it possible to also use downloaded tiles from alg's online world map. (but coding progress is slow on this end.)
Users browsing this forum: No registered users and 2 guests