Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compare Bitmap Pictures

Status
Not open for further replies.

srhoads

Programmer
Nov 21, 2001
21
0
0
US
I want to compare changes on engineering drawings and I was considering converting them to BMP format. I would like to overlay two images, have transparent backgrounds, linework of one image black and the linework of the other image red.

I want to be able to shift 1 image in the x,y by several pixels and also toggle the images up and down.

Can this be done with standard TCL/TK routines such as Tk_CreateImageType? Is there a program already availble to do this?

I have documentation of the format of BMP files but the first stumbling block will be bit-wise parsing of bytes using TCL. Any ideas for this?
 
Forget about everything written above. I just need to know how to read a Windows BMP file into TCL. I get the error "format error in bitmap data" when using the command "image create bitmap Text -file test.bmp".

Apparently TCL wants an X11 bitmap and not a WIndows bitmap. Anybody know a way around this? A conversion program maybe?
 
To create an image with a .bmp file you need the Img package:
Code:
  package require Img
Once you created Tk images you can manpulate them at will.
For an example of bitmap manipulation:
HTH

ulis
 
I'm using Wish 8.0 and it will be a major undertaking to upgrade 1000 PCs in the company to a later version. I tried the "package require Img" and got an error.

How do I acquire Img? Is it standard with later versions of TCL?
 
Are you do this in Matrix?

If you are NOT doing this in Matrix, look into SMS as a means to update local load PC configs administratively

(MS product ~:)-{{

anyway, another thing you may want to look at in this kind of deployment is useing an application server, run a shortcut to a bat file that does setup in the users env to point to the interpreter in a UNC path. That way upgrades happen at the appl server and the users never know the difference.

a third way is via login scripts to update the PCs (variable success)

if you ARE doing this in Matrix thick client, also look at "remote-load" of thick client from a network drive. this way you can specify an alternate version of TCL interpreter (higher than 8.0) and run your code.

a final way would be to use prowrap and create a distributable executible that has the interpreter bundled in so you don't have to update local loads of TCL/wish

if you were Unix boxes you would have some alternate options also.

hope it helps

John Lopez
Enterprise PDM Architect
lopez.john@goodrich.com
 
Img is an independant package.
The home page is here:
But if you can't update your 1000 PC for Tcl how could you upgrade 1000 PC for Img?

Does your need for merging images are on all these PC or can you do the job on only one PC? It would be more easier.

HTH

ulis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top