How to install *.tzg program in Ubuntu 10

Asked by Don W

Downloaded the program and it has the TGZ extension. I take it this is a compressed file. I dbl click and it opens a folder with several files. Now what?

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu nautilus Edit question
Assignee:
No assignee Edit question
Solved by:
Mark Rijckenberg
Solved:
Last query:
Last reply:
Revision history for this message
arochester (arochester) said :
#1

Have a look at Psychocats "Installing Software in Ubuntu" - http://psychocats.net/ubuntu/installingsoftware

There is a priority for installing programs:
1) Look in the Repositories
2) Install a .deb. Use something like Gdebi
3) As a LAST resort either uncompress or compile

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

its like asking how to install a zip in windows. it tells us very little. the archive could contain source code or could contain binary files.

what is the filename and what is the output of-

lsb_release -a; uname -a

thanks

Revision history for this message
Don W (drw12333) said :
#3

The file is 'bmp2cnc-0.22.tgz.
Sorry, I don't have a clue to what 'lsb_release -a; uname -a' means
Very new to Ubuntu and Linux.
Also have some files with *.tgz.gz
 Thanks

________________________________
 From: actionparsnip <email address hidden>
To: <email address hidden>
Sent: Tuesday, March 13, 2012 6:55 PM
Subject: Re: [Question #190590]: How to install *.tzg program in Ubuntu 10

Your question #190590 on nautilus in Ubuntu changed:
https://answers.launchpad.net/ubuntu/+source/nautilus/+question/190590

actionparsnip requested more information:
its like asking how to install a zip in windows. it tells us very
little. the archive could contain source code or could contain binary
files.

what is the filename and what is the output of-

lsb_release -a; uname -a

thanks

--
To answer this request for more information, you can either reply to
this email or enter your reply at the following page:
https://answers.launchpad.net/ubuntu/+source/nautilus/+question/190590

You received this question notification because you asked the question.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

Its a terminal command, run the command in a terminal (You can run one by pressing CTRL+ALT+T)

What is output?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

Also where is the file located?

Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#6

I think you need to follow this procedure ;-)

wget ftp://ftp.isu.edu.tw/pub/Unix/GNU/ftp/savannah/files/cncutils/bmp2cnc-0.22.tgz

sudo apt-get update

sudo apt-get install unp

unp bmp2cnc-0.22.tgz

cd bmp2cnc-0.22

./bmp2cnc

This last command will execute and give more info about the bmp2cnc program.

Here are the contents of the README file that is included inside the bmp2cnc-0.22.tgz file:

This is the README file for bmp2cnc, a cnc utility program that converts .bmp
formatted bitmap image files into RS-274D type "g-code" files.

I. HOW IT WORKS
Bitmap images consist of a two dimensional array of dots or "pixels", each of
which has it's own color value. The bmp2cnc program generates g-code that will
engrave the bitmap into a surface with the pixel color converted to depth of
cut. The pixel data is ordered in the file from left to right for each row,
starting with the bottom row. This means that the "zero point" or "origin" of
the image to be engraved is at the lower left hand corner, and the engraving
will proceed left to right, row by row, from bottom to top. The color value is
three bytes which represent the intensity of red, blue and green for each
pixel. These three values are averaged (essentially converting the image from
color to greyscale) and the resulting 8 bit value is multiplied by the
colorsize parameter to calculate the depth of cut (Z).

II. USAGE

The basic syntax is:
bmp2cnc [options] <input file> [> output file]

The simplest case would be:
bmp2cnc myfile.bmp
This would convert myfile.bmp to g-code and send the result to the console.

If you want the output in a file the command would be:
bmp2cnc myfile.bmp > myfile.txt

Other options are:

-h or --help
Print help and exit

-V or --version
Print version and exit

-c LONGDOUBLE or --colorsize LONGDOUBLE
Z distance from color to color (default=-0.001)
If the image colors range from black (0) to white (255), then using the
default colorsize setting (-0.001), the depth of cut will be from 0.0 (0 *
-0.001) to -0.255 (255 * -0.001).

-d or --debug
Print debug messages (default=off)
Very useful while trying out different options. Prints out a lot of
information about the .bmp file structure, tracks the progress of the parser
through the input file, and displays the size and depth of the area machined
by the resulting cnc program at the end of the output.

-o or --ortho
Separate Z moves for 2.5 axis controls (default=off)
Separates X and Z moves into their own blocks.

-i or --invert
Invert color vs. Z depth (default=off)
Normally white (255) pixels are cut deepest and black pixels (0) are shallow.
This option reverses that relationship.

-p INT or --precision INT
Number of decimal places (default=4)
Rounding error is not cumulative, and the output is zero padded to the right
of the decimal point if required to reach the number of decimal places
specified.

-r LONGDOUBLE or --rapid LONGDOUBLE
Z axis position for rapid moves (default=0.1)
This position should be set to clear the workpiece and any clamps or fixtures.

-s LONGDOUBLE or --spacing LONGDOUBLE
X&Y distance from pixel to pixel (default=0.01)
Using the default value of 0.01, and a cutter diameter of 0.125, an 800 x 600
pixel image would occupy an area 8.115 (799 * 0.01 +0.125) x 6.115 (599 * 0.01
+0.125).

-x LONGDOUBLE or --xstart LONGDOUBLE
Starting position on X axis (default=0.0)

-y LONGDOUBLE or --ystart LONGDOUBLE
Starting position on Y axis (default=0.0)

-z LONGDOUBLE or --zstart LONGDOUBLE
Starting position on Z axis (default=0.0)

Example:
Producing an 8.00 x 8.00 x .250 deep engraving from a 200 pixel x 200 pixel x
256 color picture of a flower using a .125 diameter cutter. Rather than
scaling the depth using colorsize, we'll just offset the Z axis +0.005 to keep
the depth less than 0.250:

bmp2cnc -i -o -s 0.039572864321608 -x .0625 -y .0625 -z .005 flower.bmp >
flower.txt

III. ERROR MESSAGES
Before generating any g-code output, the formatting and file identification
information at the beginning of the bitmap file is checked for errors. If
errors are found a message is displayed on stderr (usually the console), and
the program exits without further processing. The possible errors are:

1. "bmp2cnc:%s: error opening file"
   (%s represents the name of the bitmap file)
Either the file doesn't exist, or the user doesn't have read permission.

2. "bmp2cnc:%s: bfType = '%c%c', s/b 'BM'"
   (%s represents the name of the bitmap file)
   (%c represents a character value)
The first two characters of the file aren't BM, so it's probably not a .bmp
formatted file.

3. "bmp2cnc:%s: bfReserved1 = %d, s/b 0"
   or
   "bmp2cnc:%s: bfReserved2 = %d, s/b 0"
   (%s represents the name of the bitmap file)
   (%d represents a decimal value)
One (or both) of these bytes in the file aren't 0, so it's probably not a .bmp
formatted file.

4. "bmp2cnc:%s: biSize = %d, s/b 40"
   or
   "bmp2cnc:%s: biPlanes = %d, s/b 1"
   or
   "bmp2cnc:%s: biBitCount = %d, s/b 1, 4, 8, or 24"
   (%s represents the name of the bitmap file)
   (%d represents a decimal value)
These values shouldn't vary in ordinary .bmp files. If you get any of these
errors, and you're sure you have a valid .bmp file, please report this as a
bug.

5. "bmp2cnc:%s: biCompression = %d, s/b 0"
   (%s represents the name of the bitmap file)
   (%d represents a decimal value)
The .bmp file is stored in RLE (Run Length Encoded) compressed format. This is
an unusual situation and I have only seen one image editing program (the GIMP)
that would save .bmp files in this format. The solution is to open the .bmp
file in your image editor and re-save it as an uncompressed file. Since this is
a rare occurance, adding support for this type of file is a low priority. If
you add this support yourself, please let me know and I'll add it to the
standard distribution.

6. "bmp2cnc:%s: WARNING bfSize [%d] != bfOffBits [%d] + biSizeImage [%d]"
   (%s represents the name of the bitmap file)
   (%d represents a decimal value)
This is a warning, not an error, and processing of the input file will
continue. If this occurs it means that some of the formatting information in
the beginning of the file is inconsistant. Please report this as a bug if the
processing finishes normally and the output is satisfactory.

IV. BUILDING FROM SOURCE
The latest version can always be gotten from:
http://freesoftware.fsf.org/download/cncutils/

On a GNU/Linux system, execute the "compile" script from the bmp2cnc
directory. You may want to install the GNU gengetopt utility
(http://www.gnu.org/software/gengetopt/gengetopt.html) if you plan on adding
or modifying command line options. If you need information on the .bmp file
format, you can find it at http://www.wotsit.org .

V. PACKING LIST
README - This file.
bmp2cnc - Precompiled executable for GNU/Linux systems.
bmp2cnc.c - C source file.
bmp2cnc.exe - Precompiled executable for DOS systems.
bmp2cnc.ggo - Input definition file for gengetopt.
bmp2cnc.tcl - Prototype GUI by Ray Henry (<email address hidden>).
cmdline.c - Produced automatically by gengetopt.
cmdline.h - Produced automatically by gengetopt.
compile - Build script.
compile.bat - Batch file for compiling with DJGPP under DOS.
getopt.c - Source file needed for DOS compiles.
getopt1.c - Source file needed for DOS compiles.
getopt.h - Header file needed for DOS compiles.
bmp/2x8x16c.bmp - Test file (Boundary & 16 color).
bmp/3x3x24c.bmp - Test file (Boundary & 24 color).
bmp/9x9x2m.bmp - Test file (Boundary & 2 color).
bmp/grygmp.bmp - Test file (Gimp output).
bmp/grypsp.bmp - Test file (PaintShopPro output).
bmp/gryrle.bmp - Test file (Run Length Encoding).
bmp/redpsp.bmp - Test file (General Purpose).
bmp/test.bmp - Test file (General Purpose).

VI. HISTORY
This software is Copyright 2002 by Matt Shaver (and the GUI by Ray Henry) and
is made available to you under the GNU General Public License, a copy of which
you'll find in the file COPYING.

Version 0.22 - MGS ported to DOS.
Version 0.21 - MGS fixed a bug in the "flat" logic.
Version 0.2 - First version on savannah.gnu.org .
Versions 0.01 and 0.1 should be discarded.

VII. TO DO
1. Provide a precompiled DOS executable using DJGPP on FreeDOS. DONE!!!
2. Convert to the GNU build system (autoconf/automake).
3. Add a man page.
4. Finish the GUI.
5. More features!

VIII. BUG REPORTS
If you have a bug to report, send it to <email address hidden>. I will need:

1. The .bmp file.
2. The command you used to run the program.
3. The output file.
4. The version of the program (bmp2cnc --version).
5. What OS you are running on.
5. Your description of what's wrong.

I'll do my best to help you, but as this is free software, I'll have to do it
when I have the time. If you solve a problem, or add a feature, and have a
patch, PLEASE send it!

Revision history for this message
Don W (drw12333) said :
#7

drw12333@drw12333-desktop:~$ lsb_release -a; uname -a
No LSB modules are available.
Distributor ID:Ubuntu
Description:Ubuntu 10.04.1 LTS
Release:10.04
Codename:lucid
Linux drw12333-desktop 2.6.32-122-rtai #rtai SMP Tue Jul 27 12:44:07 CDT 2010 i686 GNU/Linux
drw12333@drw12333-desktop:~$

________________________________
 From: actionparsnip <email address hidden>
To: <email address hidden>
Sent: Thursday, March 15, 2012 10:35 AM
Subject: Re: [Question #190590]: How to install *.tzg program in Ubuntu 10

Your question #190590 on nautilus in Ubuntu changed:
https://answers.launchpad.net/ubuntu/+source/nautilus/+question/190590

    Status: Open => Needs information

actionparsnip requested more information:
Its a terminal command, run the command in a terminal (You can run one
by pressing CTRL+ALT+T)

What is output?

--
To answer this request for more information, you can either reply to
this email or enter your reply at the following page:
https://answers.launchpad.net/ubuntu/+source/nautilus/+question/190590

You received this question notification because you asked the question.

Revision history for this message
Best Mark Rijckenberg (markrijckenberg) said :
#8

Changing thread status back to "answered", as I have already answered the original question.

Revision history for this message
Don W (drw12333) said :
#9

Thanks Mark Rijckenberg, that solved my question.

Revision history for this message
Don W (drw12333) said :
#10

Thanks Mark-- Lots of steps but it worked

________________________________
 From: Mark Rijckenberg <email address hidden>
To: <email address hidden>
Sent: Thursday, March 15, 2012 4:30 PM
Subject: Re: [Question #190590]: How to install *.tzg program in Ubuntu 10

Your question #190590 on nautilus in Ubuntu changed:
https://answers.launchpad.net/ubuntu/+source/nautilus/+question/190590

    Status: Open => Answered

Mark Rijckenberg proposed the following answer:
Changing thread status back to "answered", as I have already answered
the original question.

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/ubuntu/+source/nautilus/+question/190590/+confirm?answer_id=7

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/ubuntu/+source/nautilus/+question/190590

You received this question notification because you asked the question.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#11

Well, you just compiled the binary from source...

Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#12

Hi Andrew,

Actually, in this specific case, it is not required to compile from source.

This is what the README says:

V. PACKING LIST
README - This file.
bmp2cnc - Precompiled executable for GNU/Linux systems.

So Don is simply using the precompiled Linux binary that is contained in the bmp2cnc-0.22.tgz file.

I did not ask Don to use the make or compile command, so no compiling was done here.

Regards,

Mark

Revision history for this message
Emmanuel Thomas-Maurin (manu-tm) said :
#13

Some distros have binary packages in tgz format (eg Slackware.)