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 674933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:45:43+00:00 2026-05-14T00:45:43+00:00

I am dealing with image buffers, and I want to be able to access

  • 0

I am dealing with image buffers, and I want to be able to access data a few lines into my image for analysis with a c library. I have created my 8-bit pixel buffer in Python using create_string_buffer. Is there a way to get a pointer to a location within that buffer without re-creating a new buffer? My goal is to analyze and change data within that buffer in chunks, without having to do a lot of buffer creation and data copying.

In this case, ultimately, the C library is doing all the manipulation of the buffer, so I don’t actually have to change values within the buffer using Python. I just need to give my C function access to data within the buffer.

  • 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-14T00:45:43+00:00Added an answer on May 14, 2026 at 12:45 am

    create_string_buffer gives you a ctypes object (an array of chars), then byref, and I quote,

    Returns a light-weight pointer to obj,
    which must be an instance of a ctypes
    type. offset defaults to zero, and
    must be an integer that will be added
    to the internal pointer value.

    The offset argument has been added in 2.6, so if you’re stuck with an older version you will unfortunately need more work.

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

Sidebar

Related Questions

I want to be able to show if an Image has been associated with
I have two files [ Main.html ] and [image.php]. However [image.php] is dealing with
I am dealing with and odd bug, I have created a custom segmented control
I have a few tables I'm dealing with regarding a Goals application (screen grab
I have created a simple image slider 'Live Wallpaper' that will call in an
I'm merging multiple small images into a rectangular mosaic. When dealing with a small
Other questions dealing with use of match_parent pre 2.2 have answers stating one should
I'm dealing with a rather frustrating bug. My ultimate goal is to have an
Here's a story: User A should be able to upload an image. User A
So I'm have a terrible time dealing with my default.png images for my recently

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.