Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Python Multimedia

You're reading from   Python Multimedia Learn how to develop Multimedia applications using Python with this practical step-by-step guide

Arrow left icon
Product type Paperback
Published in Aug 2010
Publisher Packt
ISBN-13 9781849510165
Length 292 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Ninad Sathaye Ninad Sathaye
Author Profile Icon Ninad Sathaye
Ninad Sathaye
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Python Multimedia Beginner's Guide
Credits
About the Author
About the Reviewers
Preface
1. Python and Multimedia FREE CHAPTER 2. Working with Images 3. Enhancing Images 4. Fun with Animations 5. Working with Audios 6. Audio Controls and Effects 7. Working with Videos 8. GUI-based Media Players Using QT Phonon

Time for action – developing image processing code


Thus, with ThumbnailMakerDialog at your disposal, you can develop your own code in scratch, in class ThumbnailMaker. Just make sure to implement the method processImage as this is the only method called by ThumbnailMakerDialog.

Let's develop some important methods of class ThumbnailMaker.

  1. Write the constructor for class ThumbnailMaker. It takes dialog as an argument. In the constructor, we only initialize self._dialog, which is an instance of class ThumbnailMakerDialog. Here is the code.

    def __init__(self, dialog):
        """
        Constructor for class ThumbnailMaker.
        """
        # This dialog can be an instance of 
        # ThumbnailMakerDialog class. Alternatively, if 
        # you have some other way to process input,
        # it will be that class. Just make sure to implement
        # the public API methods defined in 
        # ThumbnailMakerDialog class!
        self._dialog = dialog
  2. Next, write the processImage method in class ThumbnailMaker. The code is as follows...

lock icon The rest of the chapter is locked
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Python Multimedia
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Modal Close icon
Modal Close icon