Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5940915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:02:09+00:00 2026-05-22T16:02:09+00:00

I am making a small photo editing application using wxPython ogl.ShapeCanvas. I can load

  • 0

I am making a small photo editing application using wxPython ogl.ShapeCanvas. I can load images on the canvas. I just want to know how will I adjust the brightness/contrast of an image inside the canvas (using a slider).

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T16:02:10+00:00Added an answer on May 22, 2026 at 4:02 pm

    Hope it’s not to late to be of any help, but…I had to do something similar with OGL recently when I wanted to adjust the transparency on the fly. What I ended up doing was creating a class that made the adjustments and returned a wx.Bitmap, then I had a ShapeCanvas subclass use the adjusted picture, e.g.

    class PicAdjuster(cls):    
        def adjust_pic(self, image_filename, factor_red = 1., factor_green = 1., factor_blue = 1., factor_alpha = 1.):
            original_img = wx.Image(image_filename)
            adjusted_img = original_img.AdjustChannels(factor_red, factor_green, factor_blue, factor_alpha)
            return wx.BitmapFromImage(adjusted_img)
    

    then for the ShapeCanvas:

    class PicDisplay(ogl.ShapeCanvas):
        def add_picture(self, image_filename):
            new_img = ogl.BitmapShape()
            add_alpha = PicAdjuster()
            new_img.SetBitmap(add_alpha.adjust_pic(factor_alpha = 0.5))
            self.diagram.AddShape(new_img)
    

    Anyway, you might be able to do something similar to make your adjustments; just use your picture adjuster and call the ogl.BitmapShape’s SetBitmap() method as required.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making a small tool application that user can minimize in the taskbar .
I am making a small change to an existing application so that users can
I'm making a small game using the HTML5 canvas element. It works great, except
Hi am making a small HTML5 canvas demo. I initiated the canvas using modernizer
I'm making a small web application in Seaside. I have a login component, and
I'm making a small quiz-application in Flash (and ActionScript 3). Decided to use the
Im making a small private message application in the form of a phone. Ten
I am making a small personal application regarding my trade of shares of various
I'm making a small file-browser for my own use, in Ruby, and using Qt
I am making a small file hosting website, and each user can upload multiple

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.