Solved

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

Posted on 1998-03-11
1
523 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
Comment Utility
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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
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"…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now