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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:30:20+00:00 2026-05-20T01:30:20+00:00

I need to exchange data between FreeImage (FIBITMAP) and OpenCV format (IplImage and/or Mat).

  • 0

I need to exchange data between FreeImage (FIBITMAP) and OpenCV format (IplImage and/or Mat). I’m fine with getting data from a FIBITMAP into an IplImage or Mat since FreeImage gives you a function FreeImage_GetScanLine which you can set the OPenCV imageData ptr equal to.

However, I’m stuck on how to do the reverse, i.e. once I have an OpenCV image, how do I get its data into a FreeImage image?

  • 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-20T01:30:20+00:00Added an answer on May 20, 2026 at 1:30 am

    You have to be a little careful just copying the data pointer, a lot of image formats have padding to start each new line on eg a 4byte boundary.

    If your image has a GetScanLine() function then it’s probably safer to make an empty plImage*/cv::Mat and memcopy each row with the pointer returned from GetScanLine() and the .ptr() member of cv::MAt

    cv::Mat &src        
    int srcRowBytes = width  * src.elemSize();
    
    for (int ih=0;ih<height;ih++) {
        memcpy(dest.pointer_to_row(ih),src.ptr(ih),srcRowBytes);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need a way to exchange data between a process and a windows service.
I need a system to exchange very secret data (source code that is a
I'm building an iphone application that will need to communicate and exchange data with
I have a need of implementing two apps that will exchange data with each
I need to make Biztalk exchange data with an OPC A&E server, and it
In some project, SysV IPC | Posix queues are used to exchange data between
I am working on a Android app prototype, where I need to exchange data
To exchange data between apps I have created 2 applications, one is a UI
I need to write a script for MS Exchange Server 2003 that will analyze
I have an exchange rate table. I need to get current rate and previous

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.