IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New There's almost no difference. 1 potential rub though.
The information is the same in both cases, only the scaling of the images, and the position of the image on the page changes. After that, the details of constructing the bitmap to the screen or printing is slightly different.

I'll have to think on your suggestion some more. I've not seen constructions like that before. It looks promising at first blush.

Thanks!

[edit:] One complication is that the bitmaps are fairly large, and I need to also be able to save them at fairly high resolution. At the moment, the screen bitmap is 1392w x 1800h. The printer bitmap depends on the printer (and is read by Windows), but is larger.

I ended up going this route (of showing and saving individual maps) because I wasn't able to figure out a way to save up to 25 of these maps with high enough resolution to be useful without hitting the "JPEG Error #36" error that strikes when the jpeg is 1-2 MB in size. Different jpeg libraries don't have this error, but they introduce other problems (the code isn't mine and I don't want to introduce other dependencies). Plus, it's better to save the figures as separate jpegs anyway.

Based on the fact that the "canvas"es are different for the screen and the printer, I don't think I can make the two functions you propose totally separate. But I'm still thinking on it.

Cheers,
Scott.
Expand Edited by Another Scott Dec. 6, 2006, 01:27:24 PM EST
New Should you be using Jpeg to save the data at all?
It's a lossy compression algo, which means that if you're using them to keep the maps between runs of the program, you might be losing your data too.
New They're just pictures for pasting in documents.
I'm able to set the jpeg quality at 100% so there's no compression (unless the Error 36 bites) and it looks pretty good even when expanded some.

Borland C++ Builder 5 only has graphics routines for .jpeg .bmp (and similar). Saving the images as an uncompressed bitmap is very wasteful for what we're doing (e.g. 10 MB .bmp versus 434 kB for 100% quality .jpeg). More graphics formats would be nice, but we don't want to upgrade, etc.

Thanks.

Cheers,
Scott.
(Who is thinking about trying to port this to Python as a tutorial when/if he gets a chance.)
     What's the best way to do this? Loop or do a block 1 time. - (Another Scott) - (10)
         Query...how different is it - (Simon_Jester) - (3)
             There's almost no difference. 1 potential rub though. - (Another Scott) - (2)
                 Should you be using Jpeg to save the data at all? - (jake123) - (1)
                     They're just pictures for pasting in documents. - (Another Scott)
         May not be what you need... - (ChrisR) - (5)
             Neat. I'll have to try that. Thanks! -NT - (Another Scott) - (4)
                 From a purist standpoint... - (ChrisR) - (3)
                     I appreciate elegant solutions, but ... - (Another Scott) - (2)
                         A seasoned C guy - (tuberculosis) - (1)
                             Ah, so! Thanks. -NT - (Another Scott)

Sorry, you are not a winner.
45 ms