By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,994 Members | 1,166 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,994 IT Pros & Developers. It's quick & easy.

how to use imaageop.scale

P: n/a
Hi, I want to compress a jpg file. e.g. a jpg file which has RGB band
(24bit per pixel), 100 * 100 size to 50 * 50 size. I
tried to use scale function in imageop module but failed. Any
suggestions about this? Thanks!

Bruce

May 23 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
In <11**********************@w5g2000hsg.googlegroups. com>, Bruce wrote:
Hi, I want to compress a jpg file. e.g. a jpg file which has RGB band
(24bit per pixel), 100 * 100 size to 50 * 50 size. I
tried to use scale function in imageop module but failed. Any
suggestions about this? Thanks!
I guess you are talking about the Python Imaging Library (PIL) here? What
have you tried and in which way did it fail?

What about the `resize()` method on image objects?

Ciao,
Marc 'BlackJack' Rintsch
May 23 '07 #2

P: n/a
On 23 May 2007 00:02:34 -0700, Bruce <Ji********@gmail.comwrote:
Hi, I want to compress a jpg file. e.g. a jpg file which has RGB band
(24bit per pixel), 100 * 100 size to 50 * 50 size. I
tried to use scale function in imageop module but failed. Any
suggestions about this? Thanks!
Were there any exceptions/error-messasges ?
Do you jpeg libraries installed for hadling jpeg format ?

Cheers,

--
----
Amit Khemka -- onyomo.com
Home Page: www.cse.iitd.ernet.in/~csd00377
Endless the world's turn, endless the sun's Spinning, Endless the quest;
I turn again, back to my own beginning, And here, find rest.
May 23 '07 #3

P: n/a
On May 23, 5:31 pm, "Amit Khemka" <khemkaa...@gmail.comwrote:
On 23 May 2007 00:02:34 -0700, Bruce <JiaFang...@gmail.comwrote:
Hi, I want to compress a jpg file. e.g. a jpg file which has RGB band
(24bit per pixel), 100 * 100 size to 50 * 50 size. I
tried to use scale function in imageop module but failed. Any
suggestions about this? Thanks!

Were there any exceptions/error-messasges ?
Do you jpeg libraries installed for hadling jpeg format ?

Cheers,

--
----
Amit Khemka -- onyomo.com
Home Page:www.cse.iitd.ernet.in/~csd00377
Endless the world's turn, endless the sun's Spinning, Endless the quest;
I turn again, back to my own beginning, And here, find rest.
Amit & Marc, thank you very much. Now I used PIL instead and it works
fine.
But I still don't know how to complete this simple task with imageop
module.
THANKS ANYWAY!

Bruce

May 24 '07 #4

P: n/a
On 23 May 2007 18:58:28 -0700, Bruce <Ji********@gmail.comwrote:
On May 23, 5:31 pm, "Amit Khemka" <khemkaa...@gmail.comwrote:
On 23 May 2007 00:02:34 -0700, Bruce <JiaFang...@gmail.comwrote:
Hi, I want to compress a jpg file. e.g. a jpg file which has RGB band
(24bit per pixel), 100 * 100 size to 50 * 50 size. I
tried to use scale function in imageop module but failed. Any
suggestions about this? Thanks!
Were there any exceptions/error-messasges ?
Do you jpeg libraries installed for hadling jpeg format ?
Amit & Marc, thank you very much. Now I used PIL instead and it works
fine.
But I still don't know how to complete this simple task with imageop
module.
I think imageop moudle can handle raw images only, so if you want to
use imageop you will need to convert jpeg images to raw format.

Cheers,
--
----
Amit Khemka -- onyomo.com
Home Page: www.cse.iitd.ernet.in/~csd00377
Endless the world's turn, endless the sun's Spinning, Endless the quest;
I turn again, back to my own beginning, And here, find rest.
May 24 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.