?
Solved

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

Posted on 1998-03-11
1
Medium Priority
?
569 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 400 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
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…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

864 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