By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,144 Members | 1,131 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,144 IT Pros & Developers. It's quick & easy.

Python routine decodes enceypted map image format - Program problem.

P: n/a
Python programmers may find the application to decoding an encrypted map
image format known as Memory Map to produce a standard PNG image file

Someone obviously very well versed in Python and in the intricacies of image
files has written a routine to decode originally the UK Landranger maps, so
that they can be used with other mapping and GPS programs apart from the
restricted Memory Map viewer.

You can get the details in this RAR archive.

The application was obviously written with a specific job in mind, and has
no GUI and is not very user friendly for people to use who are not Python

One of the problems is that the original application was intended for UK
Landranger map squares which are 20000 pixels square, and when decoded from
Memory Map qct format to PNG format the files produced are around 50-60
megabytes which is quite manageable as a PNG image. PNG has to be fully
loaded into RAM to manipulate, can't be paged from disk. But with a much
larger qct image file, to decode it into a single PNG file would produce too
big a file for most computers to handle when a say 200Mb PNG file on disk is
decompressed into RAM.

So it is necessary to be able to decode large qct (Memory Map Image) files
into map squares of a manageable size.

Easy enough when you know how! Problem is the existing Python routine starts
decoding at the top left of the qct image file, and the only control in the
routine that I have been able to decipher is the number of pixels along an
edge of the square that are decoded which are controlled in the code line


near the end of the file

The last term 20000 sets the edge length of the decoded square.

The question is how can this routine be modified to start the decoding at
pixel x,y, instead of at pixel 1,1 in the qct file, and to then decode a map
square of say 20000 pixels edge length from that point, so that a qct image
perhaps 60000 x 60000 pixels could be decoded into 9 squares of 20000 x

The original programmer has solved all of the complex problems of decrypting
the encrypted file format and the routine works as intended, but with a much
larger qct file than the originally intended target you are limited to
decoding a square of about 30000 pixels edge depending on how much RAM your
computer has to later handle the resultant PNG image file. Usually the PNG
file needs to be further converted to a format which can be paged from disk
such as MrSID or ozf2 which is a format used by a very popular GPS
application called OziExplorer.

Does anyone know any "Python Pirates" who could solve this?

Could you post a suggested code alteration to do this to this newsgroup

Dec 15 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.