Solved

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

Posted on 1998-03-11
1
529 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
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…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

947 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

19 Experts available now in Live!

Get 1:1 Help Now