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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:53:37+00:00 2026-05-14T14:53:37+00:00

I cannot get my Canon Pixma MP150 to scan a color scan from c#

  • 0

I cannot get my Canon Pixma MP150 to scan a color scan from c# code. The following code is resulting in a black and white image, or if I change the value of 6146 to 2 then a grayscale image is created. I would like to be able to have a color scan from code. I know the scanner does color images because I can do one through the xp wizard in “scanners and camera”.
Can anyone help me figure out what value I am not setting for a color scan. All documentation and examples I can find just say to change the value of 6146.

Thank you for taking the time to read this!

    private void ScanAndSaveOnePage ()
    {
        WIA.CommonDialog Dialog1 = new WIA.CommonDialogClass();
        WIA.DeviceManager DeviceManager1 = new WIA.DeviceManagerClass();
        System.Object Object1 = null;
        System.Object Object2 = null;
        WIA.Device Scanner = null;

        Scanner = Dialog1.ShowSelectDevice(WIA.WiaDeviceType.ScannerDeviceType, false, false);

        WIA.Item Item1 = Scanner.Items[1];

        setItem(Item1, "6146", 1);
        setItem(Item1, "6147", 150);
        setItem(Item1, "6148", 150);
        setItem(Item1, "6151", 150 * 8.5);
        setItem(Item1, "6152", 150 * 11);

        WIA.ImageFile Image1 = new WIA.ImageFile();
        WIA.ImageProcess ImageProcess1 = new WIA.ImageProcess();
        Object1 = (Object)"Convert";
        ImageProcess1.Filters.Add(ImageProcess1.FilterInfos.get_Item(ref Object1).FilterID, 0);

        Object1 = (Object)"FormatID";
        Object2 = (Object)WIA.FormatID.wiaFormatBMP;
        ImageProcess1.Filters[1].Properties.get_Item(ref Object1).set_Value(ref Object2);

        Object1 = null;
        Object2 = null;

        Image1 = (WIA.ImageFile)Item1.Transfer(WIA.FormatID.wiaFormatBMP);

        string DestImagePath = @"C:\test.bmp";
        File.Delete(DestImagePath);
        Image1.SaveFile(DestImagePath);
    }

    private void setItem (IItem item, object property, object value)
    {
        WIA.Property aProperty = item.Properties.get_Item(ref property);
        aProperty.set_Value(ref value);
    }
  • 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-14T14:53:38+00:00Added an answer on May 14, 2026 at 2:53 pm

    In case anyone else is wondering, you have to set “4104” as well. By default it was set to 1 bit depth. That did the trick for me.

    setItem(Item1, "4104", 24);

    In order to find this out, I had to enumerate all the properties and see what they were set to:

    foreach (Property propertyItem in item.Properties)
    {
        if (!propertyItem.IsReadOnly)
        {
            Console.WriteLine(String.Format("{0}\t{1}\t{2}", propertyItem.Name, propertyItem.PropertyID, propertyItem.get_Value()));
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I cannot get the following route to fire when a url is requested from
I have an issue, i cannot get any results from mysql on a production
I cannot get my SelectedIndexChanged of my dropdownlist to fire. I have the following:
I cannot get this simple piece of code to compile without including the TestClass.cpp
I cannot get Bootstrap Carousel to start, um, carousel-ing. Below is all the code
I cannot get this code to work - what I want is that when
I cannot get my Wordpress theme to randomise the posts I'm displaying in the
I cannot get my Spring web app to find my scripts. I have the
I cannot get this function to fire off... I'm thinking I need a fresh
I cannot get my SID working ... <?php session_start(); // Or maybe pass along

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.