473,387 Members | 1,481 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

how to use imaageop.scale

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
4 1235
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: John Fouhy | last post by:
So I've got a horizontal scale widget in my GUI. When I click the mouse in the area to the right of the GUI, the scale advances by 1. 13 +-------------------------+ |<| X |>|...
4
by: codecraig | last post by:
Hi, I am using Tkinter and I have a Label and a Scale. I want to update my label everytime the Scale value changes. What is the best way of doing this? Do i have to bind for every event type? ...
5
by: Guess | last post by:
The situation is as follows: 1. I would like to serve a web page that takes considerable time to process. 2. While the page is processing, the client displays an appropriate wait message. What...
3
by: John Bonds | last post by:
I'm looking for some sort of digital scale to integrate into .NET. Does anybody know of anything (like a postal scale) that attaches to USB, serial or whatever that comes with a DLL or an API...
3
by: Jay Patel | last post by:
Hello, I need to write visual basic.net code to interface with a Mettler Toledo Shipping Scale that interfaces with a PC via USB or a serial port. I have seen example code on how to communicate...
3
by: Jerry Spence1 | last post by:
A very useful feature was added in 2.0 of .NET framework which was the scaling of a form and all the controls within it. This is really useful but I am finding very little information of how to use...
0
by: TonyJ | last post by:
Hello! We have a pc running a form application. If I push some buttons in this application I want to send some commands to a scale which is connected to a specific IP address. When I sent a...
19
by: Matteo Migliore | last post by:
Hi! I've to scale a vector of numbers of size N to a vector of size M. The trasformation is like a zoom on images but I need on a vector. The second size can be M >= N or M <= N, M 0. The...
22
by: Jesse Burns | last post by:
I'm about to start working on my first large scale site (in my opinion) that will hopefully have 1000+ users a day. ok, this isn't on the google/facebook scale, but it's going to be have more hits...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.