Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hello all: Please find out problem 1

Status
Not open for further replies.

stewang

Programmer
Aug 21, 2003
77
NZ
Hello all:
Please find out problem for me that my compiler complains it could not recognise data in image file "good.jpeg" when I run my code in linux.

my code as follow;


image create photo good -file "good.jpeg"
label .label1 -image good


Rgds
stewang
 
From the photo page of the Tk manual:
A photo is an image whose pixels can display any color or be transparent. A photo image is stored internally in full color (32 bits per pixel), and is displayed using dithering if necessary. Image data for a photo image can be obtained from a file or a string, or it can be supplied from C code through a procedural interface. At present, only GIF and PPM/PGM formats are supported, but an interface exists to allow additional image file formats to be added easily. A photo image is transparent in regions where no image data has been supplied or where it has been set transparent by the transparency set subcommand.

To be able to use jpeg images you need the Img extension.
Just add this line before image create:
Code:
  package require Img

HTH

ulis
 
Hi ulis:
Thanks for your time.

But I got a problem, when I add the code on and run it, the compiler complains that it can not find the package Img.

Then I went to website(to downloan imag 1.2.4.tar.gz, and zip this file with the command of tar zxvf 1.2.4.tar.gz, then put it into same directory with my program, but it still not work, please tell me how I can solve this problem. And I run my code
in linux.

Thanks
 
Hi ulis:
I had downloaded and extracted and run install.sh already, but
I got a problem with operate some comamnds for extend PATH and MANPATH variable to get access to the applicationas and mandpages distributed with ActiveTcl.

The commands as follow;

->First question
for a csh or compatible perform
setenv PATH
./home/xbl1/bin/bin:$PATH"
In here I went to directory of bin, but I can not find :$PATH, how can I do in here?????

->Second question
some .shells(bash for exaple) allow export.
PATH="/home/xbl1/bin:$PATH"

I typed the command with " PATH="/home/xbl1/bin:$PATH" " and
" MANPATH="/home/xbl1/bin:$MANPATH" " in terminal of linux, it accepted, but when I run my code, it still tell, it can not find package of Img.

Please tell me how to do that, thanks.


rgds
stewang
 
Hi ulis:
Thanks for you spend too much time for my question.
I can extend my PATH and MANPATH to my application now, but it still complain that it can not find package for Img, but that's ok.I can convert my .jpeg file by using a software for painting now.

rgds
stewang
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top