Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Webcam QR barcode decoder problem [modified]

Webcam QR barcode decoder problem [modified]

Scheduled Pinned Locked Moved C#
helpquestion
1 Posts 1 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    S K Y
    wrote on last edited by
    #1

    i gor error telling missing refference in PixelData... may i know what refferance...? i'm tring to do QR barcode decoder...

    private void button2_Click(object sender, EventArgs e)
    {
    unsafe
    {
    Image image = Image.FromFile("D:\\1.JPG");
    BitmapData bd = image.LockBits(new Rectangle(0, 0, image.Width, image.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
    int sourceWidth = image.Width * System.Runtime.InteropServices.Marshal.SizeOf(typeof(PixelData));
    if (sourceWidth % 4 != 0)
    sourceWidth += (4 - (sourceWidth % 4));
    Byte* bitmapBaseByte;
    bitmapBaseByte = (Byte*)bd.Scan0.ToPointer();
    PixelData* pPixel;
    for (int y = 0; y < height; y++)
    {
    pPixel = (PixelData*)(bitmapBaseByte + y * sourceWidth);
    for (int x = 0; x < width; x++)
    {
    intImage[x][y] = (int)((0xff << 0x18) | (pPixel->red << 0x10) | (pPixel->green << 8) | pPixel->blue);
    pPixel++;
    }
    }

               image.UnlockBits(bd);
           }
    

    anyone just help me....thanks...

    A S E L A

    modified on Wednesday, June 17, 2009 2:10 AM

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups