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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:02:44+00:00 2026-06-08T21:02:44+00:00

We have an image processing windows application where we are using lead tools for

  • 0

We have an image processing windows application where we are using lead tools for converting and images from 24/48 bit images to 8 bit images.

As an experiment I’m porting the application to iPad using MonoTouch and C#, now the LeadTools components are incompatible with Monotouch. Is there any alternate I can use? if not how can I convert 24/48 bit images to 8 bit?

  • 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-06-08T21:02:45+00:00Added an answer on June 8, 2026 at 9:02 pm

    To use Apple’s imaging tools here is where I would start:

    1. Convert your raw bytes into a pixel format supported by the platform. See the Quartz 2D documentation on supported pixel formats.
      Note that iOS doesn’t currently have a 24 or 48 bit format. However, if your 24 bit format is 8 bits per channel (RGB) you could add 8 bits of ignored alpha. (Alpha options are in MonoTouch.CoreGraphics.CGImageAlphaInfo)

    2. Convert your raw bytes into a CGImage. Here is an example of how to do that

          var provider = new CGDataProvider(bytes, 0, bytes.Length);
          int bitsPerComponent = 8;
          int components = 4;
          int height = bytes.Length / components / width;
          int bitsPerPixel = components * bitsPerComponent;
          int bytesPerRow = components * width;   // Tip:  When you create a bitmap graphics context, you’ll get the best performance if you make sure the data and bytesPerRow are 16-byte aligned.
          bool shouldInterpolate = false;
          var colorSpace = CGColorSpace.CreateDeviceRGB();
          var cgImage = new CGImage(width, height, bitsPerComponent, bitsPerPixel, bytesPerRow, 
                                    colorSpace, CGImageAlphaInfo.Last, provider,
                                    null, shouldInterpolate, CGColorRenderingIntent.Default);
      
    3. Use a Core Image Filter to convert to Monochrome

          var mono = new CIColorMonochrome
          {
              Color = CIColor.FromRgb(1, 1, 1),
              Intensity = 1.0f,
              Image = CIImage.FromCGImage(image)
          };
          CIImage output = mono.OutputImage;
          var context = CIContext.FromOptions(null);
          var renderedImage = context.CreateCGImage(output, output.Extent);
      
    4. Finally you can retrieve the raw bytes of that image by drawing into a CGBitmapContext constructed according to your desired parameters.

    I suspect this pipeline could be optimized, but it is a place to start. I’d be interested to hear what you end up with.

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

Sidebar

Related Questions

I have a small image processing application which does multiple things at once using
I'm working on an image processing application where I have two threads on top
I have an application that requires processing multiple images in parallel in order to
My application is using an image processing library to handle a long running task.
I have an application that is used in image processing, and I find myself
I have written an image processing application with the GUI part written in Java
On the Windows Form application I have a Lamp image (a black and white
In my application,I have to load volumedata from set of images (MRC images) and
I have a windows service that invokes some heavy image processing whenever a user
I have a windows form application in which i am using a background worker

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.