TIFF images, Working with Color Palette.

I would like to read in a tiff image, change some of the color values and then write out the new file. Is this possible?
Thanks.

Ah dude, that's super-easy.
In JAI there is a call to convert to grayscale, but here is how to remove the red from every pixel in an image:
Assuming you have a BufferedImage called image...
// get image dimensions
int width = image.getWidth();
int height = image.getHeight();
// create pixel array
int pixels = new int[width*height];
// copy data from image into pixel array
pixels = image.getRGB(0,0,width,height,pixels,0,width);
// remove red from entire image
    for (int x=0; x<width; x++)
      for (int y=0; y<height; y++)
        int index = x+y*width;
        int pixel = pixels[index];
        int red   = (pixel & 0xff0000) >> 16; // don't really need this, but whatever
        int green = (pixel & 0xff00)   >> 8;
        int blue  = (pixel & 0xff);
        // Check intensity of pixel for each band
        if (red > tolerance || green > tolerance || blue > tolerance)
          // rebuild pixel with only green and blue values
          pixels[x+y*width] = ( 0xff000000 | (0 << 16) | (green << 8) | blue);
    }There you go!
Who's ya daddy?

Similar Messages

  • Elements 10 canvas not working with tiff images; works fine with jpegs. What to do?

    Elements 10 canvas not working with tiff images; works fine with jpegs. What to do? It does not allow me to add a colored canvas, only a blank canvas.

    Perhaps some of the tiffs are already layers.
    In other words, since jpegs don't support layers, they all ways open with one locked background layer, but the tiff format does
    support layers so the tiffs don't have to have a locked background layer and can already be a regular layer that supports transparency.
    For the tiffs you could add a new color fill layer below and use the color you want the enlarged canvas to be.
    On pse 10 look at the bottom of the layers panel for the new adjustment of fill layer icon

  • Help with working with color and profiles

    Like many others, I suspect, I am having trouble managing the colors on my iMac to match the prints I get. I have a few questions, but first, some background:
    1. Screen calibrated with Huey Pantone. Calibration was done with monitor brightness all the way to lowest. I don't use Shades or anything else. I have my Display Profile set to this profile. I'd be happy to post my .icc profile if I knew how. I can email it to anyone who can help here.
    2. I have been sending my prints to Costco with the option of turning OFF their Auto Correct. To try to get things to match, I downloaded Costco's printer profiles from http://www.drycreekphoto.com/icc/Profiles/Minnesota_profiles.htm#MN (Eden Prairie, Glossy and Lustre paper profiles).
    3. I shoot photos with a Canon XTi with color space set to sRGB. I am using iPhoto 08.
    So here are my questions:
    1. I loaded the Costco printer profile icc files into /Library/ColorSync/Profiles/Displays. When I open ColorSync, I see them under Profiles/Displays. However, in ColorSync/Devices/Displays/iMac, when I go to change the profile, I navigate to these files but the computer just beeps and won't take them. I thought all icc files could be used by monitors and printers - can these Costco iccs only be used for printers (I noticed the Costco files are 4MB, the other display iccs are 4KB)?
    2. How does iPhoto handle color spaces? I import my photos off my CF card. Under iPhoto / Prefs / Advanced, I have both Copy Items and Embed ColorSync Profiles checked. Which color profile is it embedding? The one from the camera (some generic sRGB) or the one my display is using (the Huey)?
    3. As a test, I exported my photo as a full size TIFF (a 3.3MB jpeg became a 28MB tiff). I opened the TIFF in Preview. Preview / Tools / Assign Profile came up as "Camera RGB Profile" (so I think this answers question 2 but I'm not sure). While in Preview, if I now change the Display Profile (from Huey to Adobe RGB), the whole screen changes, including the photo I'm looking at in Preview - shouldn't Preview hold the photo the same since it's using a different color profile?
    4. I set the Display Profile back to Huey. In Preview, I go back to my photo and under Tools / Assign Profile I assign the profile my Huey profile (instead of Camera RGB). I save this as a jpeg and reimport into iPhoto. When I compare these two photos side by side in iPhoto, they look indistinguishable. Why, if on the original import iPhoto embedded the Camera RGB profile into the photo and I make a copy assigning the Huey profile do they look identical? There's no reason to assume that the Camera RGB and Huey profiles are the same! Or is it some trick where the Display Profile is overriding everything?
    5. Lastly, I reopened the original TIFF export in Preview and assigned it the Costco profile (happened to use the glossy one). Lo and behold, what appears on the screen is a much closer version to what I got back as a print. Finally, as one last tweak, I changed my Display Profile from Huey to Adobe RGB and the picture I saw in Preview was closer still to what I got back from Costco. I changed the Display back to Huey, kept the Costco profile assigned and saved my TIFF back to a JPEG. I imported into iPhoto and compared - it looks much closer to my Costco print.
    So I'm utterly confused. How do professionals manage their color workflow? Is my Huey calibration whacky? Why, if I assign a color profile to something in Preview, does it really depend on what Display Profile I have set (I thought profiles managed color, but it looks like it's relative).
    I apologize for the rather long post, and very much appreciate any help and suggestions here!
    Thanks!

    The contractual requirements between the vendor and your company may be the key. The contract may or may not discuss whether the vendor's permission to modify the material includes an obligation to make the documents usable. "Usable" may be construed to mean providing original files. If the vendor is required to provide originals, they may or may not be required to provide them in a common format, like MS Word, rather than the proprietary FrameMaker format they use. Their providing a PDF may completely satisfy their obligation; your lawyers may be helpful here.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices
    bmr0330 wrote:
    I did ask them for the source file but they haven't been forthcoming with that. I may look into the evaluation copy of FM anyway but considering the price ($868 USD through our catalogue supplier) I doubt I would be able to get a licensed copy once the evaluation runs out. I do appreciate the suggestion though. Thank you. Brian

  • Transitions when working with color

    I've noticed that if I have to set in and out points on things such as clips where I want to maintain motion or maybe where I have 3 layers and want to combine into a single effect clip to send to color or motion, when bringing it back in I can't do transitions.
    As an example: I have a clip with 3 layers to it. I click on it, set in and out points and export to a QT file. I then import the QT file and replace my original 3 layers with the single clip. All is good, except that if I want to add my transition back in between the new clip and the clips on either side of it, I can't.
    Wondering how you guys deal with such situations... Color seems to force you to do this quite a bit, but bringing things back in are not so easy to work with.
    Thanks,
    glenn

    Howard,
    Welcome to the forum.
    Along with Jon-M-Spear's suggestion (the one that I use most often too), many Effects can be Keyframed, so that they change over time. However, this does take some time, and can involve a lot of fiddling.
    If you have a long Clip, and know that you will be adding the same set of Effects, but just with different attributes, you can do one of two things, and both rely on Jon-M's method:
    You can create an Effect Preset, and apply that to all of your Cut, let's call them "sub-Clips," even though that term has other meanings, so be careful when using it. Then apply that Preset to all of those sub-Clips. Then, tweak each application of the Preset, as is needed for the individual sub-Clip.
    In a similar fashion, you can apply all necessary Effects to the first of your sub-Clips, tweak for it, as is necessary, then Rt-Click on it, chosing Copy. Now, Select all of the rest of the sub-Clips, to which you wish to apply that set of Effects, Rt-Click on them, choosing Paste Attributes, and then tweak, as needed.
    A variation on the above would be to apply the Effects to the origianal Clip, and THEN make the Cuts. Go back and tweak each individual sub-Clip.
    Good luck,
    Hunt

  • Blackmagic intensity wont work with color?!

    Hi everybody...
    My new blackmagic density card wont wirk with apple color software.
    Got preview only in the proces of rendering?!
    With others soft works great.
    Any ideas?
    Tnx.

    Hey Koole. I'm thinking about buy this card to use with Color, did you get it to work?
    Thanks
    KWS

  • Open Tiff image failed with imageio package

    I'm trying to open tiff files with javax.imageio.ImageReader. When openning the image file, "bad.TIF" with the following codes, I got an error. However, I can open the image with "Windows Picture and Fax Viewer" (WPFV). After I opened/saved as File "good.TIF" with WPFX, I can open the image with the progarm. Would someone please help? Thanks.
    Error position is 2
    java.lang.ArrayIndexOutOfBoundsException: 2012
         at com.sun.media.imageioimpl.plugins.tiff.TIFFFaxDecompressor.nextNBits(TIFFFaxDecompressor.java:1503)
         at com.sun.media.imageioimpl.plugins.tiff.TIFFFaxDecompressor.decodeNextScanline(TIFFFaxDecompressor.java:792)
         at com.sun.media.imageioimpl.plugins.tiff.TIFFFaxDecompressor.decodeT4(TIFFFaxDecompressor.java:1040)
         at com.sun.media.imageioimpl.plugins.tiff.TIFFFaxDecompressor.decodeRaw(TIFFFaxDecompressor.java:677)
         at com.sun.media.imageio.plugins.tiff.TIFFDecompressor.decode(TIFFDecompressor.java:2514)
         at com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader.decodeTile(TIFFImageReader.java:1137)
         at com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader.read(TIFFImageReader.java:1417)
         at javax.imageio.ImageReader.readAll(ImageReader.java:1050)
         at com.rxamerica.image.LoadTiff.main(LoadTiff.java:35)
    import java.io.File;
    import java.io.IOException;
    import java.util.Iterator;
    import javax.imageio.IIOImage;
    import javax.imageio.ImageIO;
    import javax.imageio.ImageReader;
    import javax.imageio.stream.ImageInputStream;
    public class LoadTiff {
    public static void main(String[] args)
    String myDir = "./";
    String testFile1 = myDir + "good.TIF";
    String testFile2 = myDir + "bad.TIF";
    int errorPos = 0;
    ImageInputStream tiffStream = null;
    ImageReader reader;
    try {
    reader = getReader("TIFF");
    IIOImage tiffImage = null;
    errorPos = 1;
    File file = new File(testFile1);
    tiffStream = ImageIO.createImageInputStream(file);
    reader.setInput(tiffStream);
    tiffImage = reader.readAll(0, reader.getDefaultReadParam());
    errorPos = 2;
    file = new File(testFile2);
    tiffStream = ImageIO.createImageInputStream(file);
    reader.setInput(tiffStream);
    tiffImage = reader.readAll(0, reader.getDefaultReadParam());
    catch (Exception e) {
    System.out.println("Error position is " + errorPos);
    e.printStackTrace();
    public static ImageReader getReader(String suffix) throws IOException {
    Iterator readers = ImageIO.getImageReadersBySuffix(suffix);
    if (readers.hasNext())
    return (ImageReader) readers.next();
    else
    throw new IOException("No readers for suffix: " + suffix);
    }

    Can you upload the bad tiff to an [image hosting site|http://www.imagehosting.com/]?
    In general, when you set the input stream on a reader for a second time, it's a good idea to call reset.
    errorPos = 2;
    file = new File(testFile2);
    tiffStream = ImageIO.createImageInputStream(file);
    reader.reset();  <----- this line
    reader.setInput(tiffStream);
    tiffImage = reader.readAll(0, reader.getDefaultReadParam());I don't think that's the source of your problems though. You can add an IIOReadUpdateListener and a IIOReadWarningListener to the reader to see just how far it gets just before the exception is thrown. It may very well just be a badly saved tiff, or it could be a tiff image reader bug.
    Edited by: Maxideon on Jan 19, 2009 7:07 PM
    BTW, which version of JAI-ImageIO are you using?

  • Avid DNxHD not working with Color?

    QT HD Avid DNxHD Codec working with FCP but not with Color ? Help

    I will not contest the workability of AVID. I will express skepticism about the welcome an AVID codec might receive on a Mac platform, and less so on a platform/codec-specific app like COLOR.
    I understand that Automatic Duck's "Use existing media" now works better with at least DV material for importing OMF into FCP. That's probably a big thing considering all the various quirks that have to be bridged. We know for sure that only a select few formats are welcome for import to COLOR, and even fewer for export. Heck, it goes berserk if you let a tif or jpg slip by. It doesn't even like the LiveType and Motion decompressor exports so much, so although it might work in FCP is NO guarantee at all that the media will be greeted warmly elsewhere.
    jPo

  • How to load compressed tiff image formats with JIMI

    this method
    Image image=image = Jimi.getImage(imgResource);returns incorrect Image width & height (-1) for TIFF compressed formats.
    is there any jimi example showing how to properly load the tiff compressed image ?
    thanks.

    Wild guess: how old is JIMI technology? Has it been
    kept uptodate, or has
    it been abandoned? And is LZW compression in TIFF
    format a more recent feature?yes i checked jimi docs and here is what they say :
    TIFF      
    * Bi-level / Greyscale / Palette / True Color images
    * Uncompressed images
    * CCITT compressed Bi-level images with CCITT RLE, CCITT Group 3 1D Fax, CCITT Group 3 2D Fax, CCITT Group 4 Fax, CCITT Class F Fax
    * Packbits compressed images
    * LZW Compressed images
    * Tiled TIFF files
    * Handles all values of Orientation
    * TIFF / JPG compression variant
    * any color space except RGB
    * True Color images not of Red/Green/Blue format

  • How to Render a TIFF image sequence with After Effects or Premiere

    So I shot a timelapse in RAW using my D5200.  Developed the images, imported into after effects to make a composition at 1080p 24fps, the clip is 15 seconds long.  Then I rendered the clips a few ways and none of them are what I want:
    I used the H.264 first, its just pixelated and blocky, doesn't retain a smooth resolution. H.264 output an MP4 that was 6.5 MB.
    Then I tried lossless and it output an AVI which is awesome resolution but the file is 2 gigs! Not even VLC media player will play it smoothly without buffering.
    Last I tried H.264 BluRay which output an M4V file which is 45 MB and I can't get it to play.
    So now I'm here asking you all what the way to go is.  When I download films, I will aim for a 1-2 gig 720p or 1080p file on roughly 2hr films.  The resolution is great, the audio is great and the file like I said is only 1.5gigs average.  So what are the rendering settings I should be using to get a file like this? Should I be importing it into Premiere Pro first or what?
    -Thanks
    Bruno
    For Reference, here was my workflow:
    I generally followed an Adorama Rich Harrington Time-Lapse youtube video on workflow which was:
    Developed the Raw files in Camera Raw
    Used the Image Processor to create the Tif files
    Imported into After Effects as a TIF sequence
    Interpreted the sequence as 24fps
    Changed the Composition settings to 1080p 24fps
    Then did the rendering as detailed above

    1. You don't need to export your TIFF sequence so as to import it into After Effects, you can import RAW image sequence into After Effects directly. Camera RAW will start automatically on importing. What is more, you will be able to change your Camera RAW settings at any time you want inside your AE project: in Project panel select your RAW image sequence, right-click, choose Interpret Footage -> Main... In the dialog box click More Options... button (at bottom left), and Camera RAW opens.
    2. Do NOT export to H.264 out of After Effects directly. If you need to export your composition to H.264, export it out of Adobe Media Encoder. Start from HDTV preset. If your goal is to upload your media file on e.g. YouTube, done. If you want to play it back on your computer, but your mediaplayer can't playback it in real time, start to decrease bitrate settings. Keep in mind that modern AVCHD cameras shoot with 28 Mbps, first AVCHD camcorders were shooting with 17 Mbps, YouTube preset in Adobe Media Encoder sets bitrate to 10 Mbps, Vimeo preset - to 8 Mbps.
    Choose VBR, 2 Pass so as to benefit from better quality out of smaller file size.
    See this The Video Road blogpost on Understanding Colour Processing and benefits of Render at Maximum Depth option.
    3. If you're planning to use your After Effects composition in Premiere Pro project, you can use Adobe Dynamic Link. If your After Effects composition is quite complex, render a Digital Intermediate out of After Effects and import it into Premiere Pro. See this discissuon in AE Forum on some production codecs comparison.
    P.S. See also this FAQ: What are the best export settings? entry.

  • Image Viewer with color selection?

    I'm searching an text-mode image viewer (like qiv or feh) but with built-in color picker, so I could easily find out the HEX-code of displayed colors.
    Is there something like that out there?

    MrWeatherbee wrote:Since you're the guy who thinks midnight commander is too bloated, I was hesitant to even post this alternative.
    Damn it after only 2 weeks I've already been unmasked. *stealing away and registering new account* *tap* *tap*
    MrWeatherbee wrote:
    But then again, Mac57 was brave enough to invoke the Gimp, so I'll throw this out there even though it still doesn't seem to fit:
    gcolor2
    http://gcolor2.sourceforge.net/
    Depending on your base set-up, it may have too many dependencies as well. Don't know for sure.
    But this color picker definitely has the advantage of being application independent, meaning you don't have to have any other graphics app open to use it, and it is not limited to picking colors inside the GUI like the color picker in Gimp, for instance. Basically, when gcolor2 is launched, you can pick from any color anywhere your mouse can be moved.
    I've used it for quite some time in various Linux distros including Arch.
    Even if it isn't what I'm actually searching, I think I'll stay with gcolor2 since it seems that there isn't any qiv-like app. with built-in colorpicker.Thank you.

  • How to handle multiple image montage with color corrections

    I am using Photoshop CS5 and am creating a photo montage poster with about 30 images on it.  The photos are not stellar and I need to change levels, exposure, saturation etc to each image.  I was creating groups from layers for each image then dropping it onto the montage file, but I see that filters effect every layer below.  I have a gradient layer as my background and I don't want it affected nor do I want every layer below affected.  I created smart layers from each image, that works, but it really slows the system down.  What is the smartest and most efficient way to handle this?
    Thanks,
    Lisa

    use the clipping mask
    so you make the adjustment layer, then click layer > create clipping mask
    this essentially ties that adjustment to the layer below

  • Will Intel Core Duo image work with Intel Core 2 Duo image

    I soon need to start preparing an image for the next school year since we are soon going to start moving into a completely new campus which images will need to be ready for lab imaging over the summer and the sooner I can have a lab image ready to be tested the better, but my question is......
    If I create an Intel image on a "Intel Core Duo Processor " which we have currently, to then create this image and then push out two two complete brand new labs of what will be "Intel Core 2 Duo Processors"
    I know in the past I have created images on the highest PowerPC computer (G5) and had the image on G3's, G4's, G5's etc. an work. I'm not sure if the difference in the processor will require the image to be made on the very same computer or not. If so, we will need to purchase one.
    Anyways..... just wondering if someone has already tested this or played around with it?
    Thanks,
    Carter

    The build version on the Core Duo models is not the same as the build version on the Core 2 Duo models. These individual builds are customized for their respective hardware. The only version of OS X that will be common for all Intel models will be a public build version that supercedes both custom builds.
    The extant builds are here: http://docs.info.apple.com/article.html?artnum=303315. However, the table does not include the latest Core 2 Duo MBP.
    If you upgrade all Intel Macs to 10.4.8 then an image of that version of OS X should be common to all Intel Macs.
    Why reward points?(Quoted from Discussions Terms of Use.)
    The reward system helps to increase community participation. When a community member gives you (or another member) a reward for providing helpful advice or a solution to their question, your accumulated points will increase your status level within the community.
    Members may reward you with 5 points if they deem that your reply is helpful and 10 points if you post a solution to their issue. Likewise, when you mark a reply as Helpful or Solved in your own created topic, you will be awarding the respondent with the same point values.

  • Why can I not get a pdf with images work with quick look in the ipad

    Why can I not use the Quick Look function when I view a pdf with images, on my Ipad?

    Try install the free Adobe Reader app
    http://itunes.apple.com/sg/app/adobe-reader/id469337564?mt=8&ls=1

  • Has somebody worked with Color and The matrox mxo ???

    So,
    i have digital postproduction in hamburg germany.
    We have two 5D Cyborg Online Systems, 3d Workstations with xsi,
    and an Mediacomposer.
    So last Year we started to do onlinening on Set for digital shooted
    highspeed tv commercials (With the Weinberger Sppedcam).
    We do this with on of our mobile 5D Cyborgs Systems.
    Which i think, is one of the best Online systems still on the Highend market.
    But Colorcorrection is more and more Important specially with digital shooted footage.
    So the ColorCorrection tools in the Cyborg a pretty nice.
    But I wanted a portable Colorcorrection Tool/system for deficile Corrections.
    So i heard about Silicon Color.
    So now I´ve bouht FCS 2, and i already had a AJA Io La Box.
    Color don´t give me a Videoout over this to my Sony Class A.
    So how ist the Quality from the MXO on a Apple Cinema , like a Sony BVM Class A ? is it a reference Picture ?
    Second Question
    How is the Workflow, because with a mac book pro, a calldigit raid and color, you need a secondary displa for the scopes and the workpicture ( masking etc).
    Is the Presenationmodus from the MXO in the same Quality of the Mastering Mode.
    And is it ease and fast to switch between them.
    Thanks to all
    mario
    Hamburg

    check out this thread on a nother forum:
    http://forums.creativecow.net/cgi-bin/newreadthread.cgi?forumid=223&postid=1519&univpostid=1519

  • Adding private IFD and IFD pointer to TIFF image metadata with jai-imageio

    Hi,
    I searched on the Internet for the answer but I was only able to find this post from the old forum/mailing list:
    http://www.java.net/node/698039
    The question in the post went unanswered and I am in a very similar situation now. To re-iterate the questions:
    * How to merge the metadata of the private IFD into the root IFD?
    * What to populate for the offset parameter in the private IFD pointer tag (the parent tag)?
    I am modeling it after the EXIF tag sets, very similar to what is in the above link.
    Any help would be greatly appreciated ...
    Thanks,
    Dennis

    Hi Jim,
    Thank you for posting in the MSDN forum.
    You know that this forum is to discuss the VS IDE issue,
    I am afraid that the issue is out of support of
    Visual Studio General Forum
    To help you find the correct forum, would you mind letting us know more information about this issue? Which kind of app do you want to develop, a WPF app or others?
    If it is the WPF app, maybe this forum would be better for it:     
    http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=wpf
    Thanks for your understanding.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

Maybe you are looking for

  • Weblogic Portal 7.0 to iPlanet Authentication

    I have a lot of questions, but first, I will tell you about our problem and our setup. We are trying to use iPlanet as our Authentication piece for WLP 7.0, and we are running into problems and exceptions. First, we setup iPlanet to have a group call

  • Using the time function for formulas.

    i am having alot of trouble adding when making my cells under the time format.  it comes up with crazy results.  i have made certain that the date is none and the time is uniform in all of the cells.  The table is entering under a time and having two

  • Occurred while executing line 5 of valid BeanShell script

    Hello Everyone, I am a newbie to Endeca Guided Search. I had created a new Developer project. I updated its input source, Properties and Dimension. after doing this when i go to my application directory C:\apps\TestApp\control> and try to execute ini

  • 3D Banana Animation - conceptual help please!

    I'm looking for some feedback concerning a 3D applet that I am about to write this week. A big thanks in advance to anyone who can help me! I am new to Java 3D, but I am looking to write a program where a "banana character" will juggle. Here is how I

  • HT201302 How to import only the newest iPhone photos to iPhoto library/Mac

    I have an iPhone 4s and every time I connect my iPhone to my Mac it downloads all the photos. How do I import only the newest photos? To have to check what I already have in albums and select only the latest would be very time consuming. There must b