Dithering no longer seems to work under 1.4.2_03

I am trying to convert a jpeg to a 1 bit per pixel Buffered image.
The current implementation is working fine under 1.3.1_05 but not under any of the 1.4.2 JVM's that I have tried. Any tips on what I am doing wrong?
Here is a snippet of the the code:
// input stream is from a jpeg file:
JPEGImageDecoder jpgDecoder = JPEGCodec.createJPEGDecoder(src);
// decompress to a AWT buffered image. this will be our source image in the color
// space of the original jpg.
BufferedImage srcImg = jpgDecoder.decodeAsBufferedImage();
// create an output buffered image in the color space that we need. in this case
// one bit binary.
BufferedImage destImage =null;
Graphics2D graphics=null;
int bufferedImageType = BufferedImage.TYPE_BYTE_BINARY;
// cols and rows are passed in as parameters
destImage = new BufferedImage(cols,rows,bufferedImageType);
// create a Graphics2D context out of the Output buffered image and draw the
// source image to it. This will convert the color space for us. At least it does under 1.3.1
graphics=destImage.createGraphics();
// the following commented line has the effect of inverting the color for us.
// this would be nice except it seems to have the effect of hanging 1.3.1 JVM.
//graphics.setXORMode(Color.WHITE);
graphics.drawImage(srcImg,null,0,0);
// get the data buffer from the destImage and send it back to the caller
DataBufferByte dataBuffer = (DataBufferByte)destImage.getData().getDataBuffer();
return dataBuffer;
This works great under 1.3.1 The returned data buffer is merged with some other images and the result is a nicely dithered 1 bpp output image. (I am currently generating either tiff or png at 1bpp).
Under 1.4.2 it seems that instead of dithering I get some sort of thresholding that looks awfull. No attempt to emulate grayscale is made at all.
Has anyone encounterd this problem? I have looked through the forum but nothing similar seems to be posted.
If you need a more concrete example I can post a main that reads the jpg, converts it to 1bpp and saves it as a tiff.
Thanks
Richard Seabright.

I think this is 2D issue. Try to ask in 2D forum.

Similar Messages

  • How can I print from Dreamwaever File/Print no longer seems to work on MAc

    How can I print from Dreamwaever File/Print no longer seems to work on MAc

    The Print Code function has been removed from DWCC (not exactly sure why).
    You can help get it back by submitting a request here: https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

  • I can't shut down my IPad button on top no longer seems to work

    I can't shut down my IPad. The button no longer seems to work.

    I realize you've stated that the sleep/wake button (button on top) no longer functions but try the follow anyways:
    Device Reset (won't affect settings/data/music/apps/etc)
    1. Press and hold (& continue to hold) BOTH the Sleep/Wake button & the Home button.
    2. Continue to hold BOTH (ignoring any other messages that may show) until you see the Apple logo on the screen.
    3. Release BOTH buttons when you see the Apple logo and allow the device to boot normally.

  • Changing date (and sequence) of events by changing dates of photos no longer seems to work. Any idea what to do?

    I am scanning in old slides and negatives (from the 1960s and 70s), and I want to get the resulting "events" in sequence from when the photos were taken, rather than when they were scanned. So I have been changing the dates of the photos, and previously this resulted in the associated event moving to the proper sequence. This definitely worked a month or so ago, both with prints scanned in on a flat-bed scanner, and also with slides and negatives scanned with a Veho scanner. That was faulty, however, and so it has been replaced with a Plustek 7500i scanner, using SilverFast scanning software, and importing the resulting images into iPhoto. I have recently tried to change the dates of the resulting events, and it doesn't seem to work as it used to. There has been an update to iPhoto 9.1.3 since my earlier success.
    Take for example one event, CS73A. Hovering over the event in the "All events" display gives dates of 1 Apr 2011 to 2 Apr 2011; these are the dates the slides were scanned in. If I open the event and choose the Info tab, it gives the event date as 02/03/1973 (which is the approximate date that I changed it to). I had done a batch change on the event this time, so the date and time on the first slide is 2 March 1973 09:30:48. Each successive slide is 1 minute later, and the last is 2 March 1973 10:08:48 (38 slides). I asked for the dates in the files to be changed as well.
    I don't know what I'm doing that's different from before. The only things I can think of are (a) something has changed in the iPhoto update, or (b) the SilverFast software stores the scanning date in some part of the EXIF that iPhoto can read but not change. I don't have tools to examine the EXIF unfortunately.
    What to do?

    Chris, I have run into the same problem.
    Try this:
    Open an event with more than one photo in it.
    Adjust the date of one or more photos. The event date does not update.
    Delete any one photo. The event date now updates to match the above date change.
    Undo the delete photo. The event date stays matching.
    Change the date of any photo again. The event date updates now every time.
    If you close the event and reopen it, you have to start over with the delete one photo thing.
    I don't understand it but it works here.
    I also have had the problem of events not sorting themselves in order of the dates when VIEW, SORT, BY DATE is selected. This seems to affect only the events were photo date changes had been made. Using the delete thing seems to keep the events in order.
    Another funny thing: When I put photos into iMovie the times in iMovie show as 7 hours off the photo time.
    I think Apple owes us an update to iLife!

  • My Macpro no longer syncs with my 3g Iphone. I've set my phone to sync but it no longer seems to work.

    My MacPro no longer seems to sync with my Iphone 3G even though I've checked the setting on the phone.
    any ideas as to how to fix?  I've checked mobile me and haven't seen anything that is an issue although I looked
    at my _me account and it stated there was an error 64 connection.
    Thanks

    Hello Nash_x91x,
    Thank you for the details of the issue you are experiencing when syncing music to your iPhone 5.  I recommend resyncing the music to your iPhone for the issue you described. 
    If you are syncing automatically, resync content to the iPhone by unchecking "Sync Music" and click "Apply."  Then check "Sync Music" and click "Apply" again.  If you do not want to sync your entire library, be sure to select "Selected playlists, artists, albums, and genres" and select the content you want to sync:
    If you sync manually, delete the music when your iPhone is selected in iTunes and drag new content to your iPhone.
    You can find the syncing steps in the following article:
    iTunes 11 for Windows: Set up syncing for iPod, iPhone, or iPad
    http://support.apple.com/kb/PH12313
    Thank you for posting in the Apple Support Communities.
    Best,
    Sheila M.

  • Adobe Flash doesn't seem to work under Mavericks

    I just bought a Macbook Air today from the Apple Store, and they installed Mavericks for me. However, when I got home and installed Adobe Flash Player, it didn't seem to work. I watch a lot of tv etc online and this is preventing any videos to play.
    Is there a way around it or do I have to get Mountain Lion reinstalled?

    If you're sure you've installed the latest version of Flash, take each of the following steps that you haven't already tried. After each step, relaunch Safari and test. For a "missing plug-in" error, start with Step 4.
    1. If you're getting a "blocked plug-in" error, then from the menu bar select
     ▹ System Preferences… ▹ Flash Player ▹ Advanced
    and click Check Now. Quit and relaunch your browser.
    2. Triple-click the line below to select it:
    /Library/Internet Plug-Ins
    Right-click or control-click the highlighted text and select
    Services ▹ Open
    from the contextual menu. A folder should open. Delete the following item, or anything with a similar name, if present:
    Flash Player (failing).plugin  
    You may be prompted for your login password.
    3. Re-download and reinstall Flash. Download it from this page:
    Adobe - Install Adobe Flash Player
    Never download a Flash update from anywhere else.
    4. If you get a "missing plug-in" error, select
    Safari ▹ Preferences... ▹ Security
    from the Safari menu bar and check the box marked Enable plug-ins.
    5. Select
    Safari ▹ Preferences... ▹ Extensions
    from the Safari menu bar. If any extensions are installed, disable them.
    6. In the Safari preference window, select
    Privacy ▹ Remove All Website Data
    Close the window. Then select
     ▹ System Preferences… ▹ Flash Player ▹ Advanced
    and click Delete All. Close the preference pane.

  • F1-F4 no longer seem to work

    Hello,
    Recently I noticed that I wasn't able to open the "Run command" windows by using the combination ALT+F2 anymore. Neither was could I close the current window using ALT+F4.
    At first I thought it had something to do with KDE (my DE), but the shortcuts were set properly. And that's when I found out my function keys just didn't work anymore, because you can see what keys are pressed when setting the keyboard shortcuts in KDE. But F1 though F4 just didn't work.
    So I killed X (I need ALT to go to the console without killing X and kdm ) and went to the cli. But to my surprise, even from there switching to VC/2 or VC/3 didn't work. This probably rules out X and KDE as the guilty ones.
    Then, I figured it had to be my hardware ( I own the latest Aluminium Apple KBD), but xev actually does generate events:
    KeyPress event, serial 31, synthetic NO, window 0x2800001,
    root 0x13b, subw 0x0, time 55543768, (183,-165), root:(187,312),
    state 0x10, keycode 212 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False
    KeyRelease event, serial 31, synthetic NO, window 0x2800001,
    root 0x13b, subw 0x0, time 55543840, (183,-165), root:(187,312),
    state 0x10, keycode 212 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
    Besides, in my dual-booted Windows everything works flawlessly.
    My KEYMAP var in rc.conf is set to "us", so there's nothing strange here either.
    It's really a very annoying situation. I was hoping that someone could point me in the right direction. Tnx!
    Last edited by LB06 (2008-05-01 23:20:59)

    hcjl wrote:
    @LB06
    does this also solve the issue with the pipe symbol, which is not available via "alt gr & <" anymore?
    i really thought that 2.6.25 kernel fully supports the new apple alu keyboard.
    thx & rgds
    hcjl
    @LB06
    i already found out, that it does not solve above problem. for that you have to define a custom keymap to switch < and ^.
    but what is the exact syntax adding it to modprobe.conf?
    i added
    options hid pb_fnmode=2
    to /etc/modprobe.conf and uncommented FILES="/etc/modprobe.conf" in /etc/mkinitcpio.conf, but it did not work out.
    any ideas?
    thx & rgds
    hcjl
    Well, I get the | symbol when pressing right alt+[key left of 1], but I also have a pipe symbol next to my apestrophe.
    To be honest, I don't really know what syntax to use for modprobe.conf. I haven't had the time to look it up and test it. I just added the line to my rc.local, which is kinda dirty, but it does get the job done just fine.
    @MoonSwan: I don't have a Mac either. Just an Apple keyboard, which I chose because I really like the way it types. As far as I know it's not a mac related problem, but a keyboard related issue (in fact, it seems to be a feature, not a bug).

  • Mustek SE A3 1200 scanner no longer seems to work with Mac pro

    Hi,
    I have a Mustek SE A3 usb 1200 pro scanner and it just recently stoped working [I think it is since I updated to Mavericks.] I tried looking for a new driver but there is only one for mac for my scanner.
    The problem is when I open Image Acquire and try to start scanning, it will start scanning and either freeze or crash and give me a "this programe quit unexspectidly" message. I'm not really sure what the problem is, howeever the fact that it started to sudenly and recently makes me suspicious of Mavericks, however it could be something else.
    I would appriciate any thoughts, ideas, suggestions,
    Thanks,
    -Adrienne

    In my experience with this scanner under both Mountain Lion and Mavericks, it doesn't work like a normal TWAIN scanner, in that only Image Acquire (and not Image Capture, Photoshop, etc.) can see the scanner.  This was the case under previous OS for me.  I even tried to install TWAIN SANE but that didn't help.  However, it appears they have a new version that is Mavericks compatible:
    http://www.ellert.se/twain-sane/
    you might try that.  Mine works but I and dealing with a clean install of Mavericks, not an upgrade.  That might be the difference.
    The drivers on the Mustek website say 10.6 but they DO work for me under Mavericks.

  • HT4882 This no longer seems to work since Lion was installed and still not with Mountain Lion.

    It seems this feature has stopped working only since Lion (now Mountain Lion)was installed. I wil try an old copy of an earlier OS as an external boot to check but this appears to be anOS upgrade problem.

    The Swedish site you've linked is discussing .xmodmap, which is a hidden (hidden because of that leading dot) configuration file in your login home directory that's used to customize settings for the keyboard mapping within X11.
    I'd expect the XQuartz tool to read ~/.xmodmap in your login directory as part of its initialization sequence.
    The xmodmap tool (no leading dot, and not a hidden file) is an application that's used to process the configuration file.
    When you invoke xmodmap (the tool), you either need to specify the full path /usr/X11/bin/xmodmap for it to be found and invoked, or you need to have the /usr/X11/bin/ directory added to your PATH.  Your PATH is the list of directories where OS X looks for the tools you're invoking. 
    If the xmodmap tool is not working, are there any diagnostics?  Or is XQuartz not honoring the request?  (If so, see if it will honor the setting made via the .xmodmap configuration file.)
    And if you don't get an answer here, you might try the (pretty quiet) Apple x11-users mailing list.

  • Multimedia Factory no longer seems to work

    I upgraded my PC Suite and did have version 6.84.10.4 of Multimedia Factory to send MMS messages from my PC via my phone. I updated and am now running 6.85.12.0. When I try and send an MMS now I get "Message sending failed" on my phone (N95). I can click OK or Details. If I click Details it says "Incorrect message format" and there is only the choice to click OK.
    Any ideas? Multimedia Factory is very useful for me because I send lots of international texts and it's a way of keeping the costs down even when roaming (they always come out of my allowance regardless).

    Well I usually upgrade PC Suite when PC Suite says there is an update. Which is usually via a link in the PC Suite main screen that says something like "Upgrade PC Suite". I don't remember how I came to know there was an upgrade to Multimedia Factory (since it is installed separately as an add-on like you say) but I installed it and regretted it immediately afterwards because it meant I was unable to send MMSs.
    Fortunately I was able to install the previous version of Nokia PC Suite and also the previous version of Nokia Multimedia Factory on another PC (so that I was in the same situation as I was before the upgrade) and see that since it worked it must have been the new update that broke it. Otherwise I would probably have started thinking it was a setting on the phone and not been able to find out what it was. I'm also luck that you use MM Factory too, since no one else has seemed to have noticed it :-)
    You are right about the email address, when I emailed them to ask them about the Silent mode not being selected when you press and hold the # key, they told me to go and take my phone to the nearest Nokia service point LOL. :-)

  • The hard-wired network connection on my HP 8600 no longer seems to work

    1.  I have a HP 8600 CM750A.
    2. The OS is Windows 7 Ultimate SP1 64-bit
    3. My printer was on the network and was working fine until about a week ago.  The only error is 'printer cannot be found' when I try to print.  This is because it is no longer on the network. Whenthe network cable is plugged into theprinter and the router, the port does not light up.  If I plug my computer into that port, the port lights up.  Each of  the 4 ports works fine when my computer is plugged into it. 
    I tried to two different network cables.  Neither cable lights up the router when plugged into the printer but when plugged into my computer, the router lights up just fine.  I am afraid that the network port on the printer has gone bad.

    The green light not activating with an Ethernet cable does indicate the port is not functioning.
    Do you have a wireless network?  If so, the printer may have connected to the network somehow.  HP printers only support one network connection at a time and the Ethernet port will be deactivated if there is a wifi connection.
    Make sure the printer does not have a wifi connection.  This can be done by going to Setup>Network>View Network Summary>View Wireless.  If it has an active wifi connection, it will list the IP address and network SSID.  If it does, you will need to restore network defaults in the Network menu of the printer and turning the printer off for 30 seconds and then turning it back on.
    ↙-----------How do I give Kudos?| How do I mark a post as Solved? ----------------↓

  • My iPod shuffle feature no longer seems to work

    This is odd. I got a new iPod and when I hooked it up and transferred my old music to the new one (not sure how I did it) it now seems to shuffle my songs but it will play 2 or 3 or 6 or 7 songs by the same artist in a row. It drives me insane.  I don't think it's genius, cause that's not turned on... it just randomly groups songs by the same artist together so I'm not getting a true shuffle experience. It's very odd and totally annoying. Anyone know what's going on?  And I should add, the new iPod (5th generation nano) completely failed to hold a charge so I had to go back to my 2nd generation Nano (which never had this problem before). thanks

    Nevermind, I figured it out. Somehow I had 'shuffle albums' on LOL

  • The Print function no longer seems to work in Firefox 6. When typing "Control P" or selecting Print from the file menu nothing happens. No error message, no drop down menu, nothing to select. Help!?

    I can't print, print preview, nothing. I have several printers associated with this computer, including an HP, and PDF creator - none of these appear in a drop down menu, there is no error message, yet these all function fine if I am not on the internet!

    No errors in error console. No effect using *. I tried using the dns name of my localhost both in the Firefox URL and in the javascript and I get exactly the same. I have spent a huge amount of time looking into this issue.
    One thing I noticed is that if I use the examples on the internet (http://arunranga.com/examples/access-control/preflightInvocation.html or http://saltybeagle.com/cors/) they work in the same browser. These examples however, are accessed through HTTP proxies.
    I am wondering if the issue has to do with using the same hostname just with different ports.

  • My smart playlist no longer seems to work when it comes to ratings?

    This is a bit weird. I have like 40 podcasts under one podcast (I'm behind in listening to them). Rather than copy all of them to the ipod I created a smart playlist that had these rules:
    Podcast is true.
    Artist contains XXXX (xXXx= name of the author)
    Rating is at least * (I use one star and select the one's I want to listen to based on stars).
    Then I sync the smart playlist to my ipod.
    Now, all the ipods show under the smart playlist and I can't get them to go away. I would think the rating is the problem. I've "selected all" and changed the rating to "none" but the podcasts all still show under the smart playlist.
    Any idea what has happened or what I'm doing wrong?
    Thx.

    I figured this out on my own. I noticed when looking at the smart playlist that somehow "one star" had become noted for the ENTIRE series. So it was copying everything over.

  • My send to button no longer seems to work in preview

    I seem to be unable to post my photos from preview using the send to button.  This just stated a few days ago

    Yes.  To define further, it only seems to be FaceBook that is having the issue.  I can send to Twitter and airdrop, but not FB.

Maybe you are looking for

  • Again imac 309rs/a fan noise

    Hello! problem with fans again After hanging my imac - fan began to publish a crackling sound. that this could be? few image's of istat here look's like all right and here: imac didnt hanging again, but noise crash my mind so what i try to do: reset

  • I had to switch my Ipod to an older model and now it won't load all my ITunes songs. Any advice?

    I had to switch to an older Ipod (4th generation nano) since my current IPod was stolen. When I connected to ITunes some of my currently purchased songs are not downloading into the older IPod. ITunes is recognizing the older IPod, but not transferri

  • Using environment variables in a wmi query

    Hello I'm trying to use WMI Queries on Group Policy Preferences to targeting computers on my network. I have a file named testfile.txt in Windows directory and I check its last modified date to replace the policy files if the date is older of than cu

  • Exit Function ZUPF_EXCEL* in Web Layout

    Hi gurus, I created an Exit Function based in Standard function "UPF_EXCEL_AFTER_DATA_PUT_01". I put this function in the field 'name of writing module' like explains very good Alberto Sabate in his post (layout in change mode). The functions runs ve

  • Process and Form version question

    a few questions related to the versions of Forms and Processes: 1) in WorkSpace, launch a process, then put the form in "Draft". then modify its XDP, the form gets a new version in the repository. what's going to happen to my Draft? when I launch the