For Programmers: Free Programming Magazines  


Home > Archive > Smalltalk > March 2008 > Reading Image files in Linux









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Reading Image files in Linux
Ajaya Ghosh A.S

2008-03-26, 4:52 am

Hi all..

I tired to read a JPEG and BMP image by using the code -
ImageReader fromFile:'path'---- in operating system Linux(Fedora Core 6) in
Visual works.

eg: (ImageReader fromFile:'/root/image006.jpg')image
( ImageReader fromFile:'/root/image006.bmp')image

but i am not getting these images read correctly in Linux , but in
Windows Operating system it is reading correctly and working fine. I can
read GIF image correctly by using the same code in Linux.

Is there any other way for reading JPEG and BMP images in Linux operating
system?.

HTH
Arun.S


Hans-Martin Mosner

2008-03-26, 8:00 pm

"Ajaya Ghosh A.S" <ajaya.ghosh@ivasystems.co.in> wrote:
> but i am not getting these images read correctly in Linux , but in
> Windows Operating system it is reading correctly and working fine. I can
> read GIF image correctly by using the same code in Linux.
>
> Is there any other way for reading JPEG and BMP images in Linux operating
> system?.


The code should work correctly independently of operating system.
Is it possible that you transferred the images using a mechanism that
is not safe for binaries (such as FTP with ASCII mode)?.

Cheers,
Hans-Martin
--
Martin Kobetic

2008-03-26, 8:00 pm

I don't know about BMPs, but the JPG reader apparently support only a fairly constrained set of features of the format
which pretty much none of the JPG files that I ran into satisfies. However there's a bundle in the public repository,
called JPEG I think, which seemed to read everything I tried it with. The API is slightly different from the
ImageReader, you do something like:

(JPEG.Reader filename: aFilename) image

HTH,

Martin

Ajaya Ghosh A.S wrote:
> Hi all..
>
> I tired to read a JPEG and BMP image by using the code -
> ImageReader fromFile:'path'---- in operating system Linux(Fedora Core 6) in
> Visual works.
>
> eg: (ImageReader fromFile:'/root/image006.jpg')image
> ( ImageReader fromFile:'/root/image006.bmp')image
>
> but i am not getting these images read correctly in Linux , but in
> Windows Operating system it is reading correctly and working fine. I can
> read GIF image correctly by using the same code in Linux.
>
> Is there any other way for reading JPEG and BMP images in Linux operating
> system?.
>
> HTH
> Arun.S
>
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com