Solved

C++ & Tcl/Tk image -> Gif/Jpeg

Posted on 1998-03-11
1
542 Views
Last Modified: 2013-11-19
Looking for a way to convert an image in an Tcl/Tk canvas to a gif or jpeg image for an export to a  Web Page...I have to code it in either C++ or Tcl/Tk code.
0
Comment
Question by:fprefect
1 Comment
 
LVL 3

Accepted Solution

by:
q2guo earned 200 total points
ID: 1183373
Hi fperfect

The best way to do this would be to save the image in the Tcl/tk canvas to postscript.  And spawn ghostscript to convert  the postscript file to a gif file.
I assume you have ghostscript installed on your machine.
command 'gs -h' gives cursory help.

Generate postscript for the canvas is remarkablely simple.
For example, to generate a postscript file for a canvas named .drawing.
you would write
.drawing postscript

If you need further help, please let me know.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Automatically select the layer when layer click 5 69
watermark on the graphic 9 82
Need icon art 9 119
gdb doesn't stop on breakpoint 2 98
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question