DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: How to count black or white pixils from a 1bit Tiff file for a given row or colum?

  1. #1
    Join Date
    Feb 2010
    Posts
    2

    Question How to count black or white pixils from a 1bit Tiff file for a given row or colum?

    Does anyone know of a utility, library, or DLL that will count the number of white or black pixils for a given row or colum from a 1bit Tiff image file?

  2. #2
    Join Date
    Jun 2009
    Posts
    135
    Not right off hand but you can do this on 2k and prior systems with the wang/kodak controls and on xp and later machines with wia 2.0 which you can download and get info from M$. Not that I have used wia much but I believe there is code that will allow you to display a tiff in a picture box. From there you could use VB's intrinsic point method (very slow) or the API GetPixel (faster but...). All you would need to do is retrieve the width/height and use a for loop to go from left to right or top to bottom...



    Good Luck

  3. #3
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663

  4. #4
    Join Date
    Feb 2010
    Posts
    2

    Lightbulb

    Thank you for your help. The TIFF files I'm working with are very large and I can't load the entire file in to memory or a picture box. May be I can use WIA’s filer function to chop the image up in to manageable fragments then process each fragment separately. I want to write an application that calculates the ink settings for a press that has 16 ink columns per plate and I need the ratio of white/black pixels for each column region.

Similar Threads

  1. wav file fade in out help
    By jase_dukerider in forum C++
    Replies: 2
    Last Post: 04-14-2005, 07:48 PM
  2. File uploading / objFile.Write problem
    By Tomer Cagan in forum ASP.NET
    Replies: 1
    Last Post: 07-24-2001, 09:01 AM
  3. NullPointerException when reading text file
    By Andrew McLellan in forum Java
    Replies: 3
    Last Post: 05-09-2001, 05:34 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center