wood burning stoves 2.0
The moose likes Other Open Source Projects and the fly likes scanning pixels of .tiff image using imageJ library Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "scanning pixels of .tiff image using imageJ library" Watch "scanning pixels of .tiff image using imageJ library" New topic

scanning pixels of .tiff image using imageJ library

me erum

Joined: Feb 05, 2012
Posts: 2
im using the imageJ library to read a .tiff image file. But when im trying to read the pixels of image1 in variable c, i get an error saying "incompatible types: required int, found int[]. im quiet new to java, so can somebody tell me how to get around this problem. The code is otherwise working fine with other image formats.

Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14998

The error means that the method you are calling returns an int[] (array of int), but you are trying to assign that to an int (because c is an int). That won't fit; you cannot put an array of integers in a single integer. Find the documentation of the ImagePlus class and read what the getPixel() method returns exactly.

(Please UseCodeTags and indent your code properly).

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Darryl Burke

Joined: May 03, 2008
Posts: 5044

Please BeForthrightWhenCrossPostingToOtherSites

luck, db
There are no new questions, but there may be new answers.
I agree. Here's the link: http://aspose.com/file-tools
subject: scanning pixels of .tiff image using imageJ library
It's not a secret anymore!