Solved

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

Posted on 1998-03-11
1
550 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Not only does Prezi allow you to create non-linear presentations, it also makes it easy to apply transition animations between your frames. Learn how to apply a fade-in transition to select items and entire frames in this tutorial Select "Edit Path"…

695 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