Announcement

Collapse
No announcement yet.

Black and White swapped during format conversion

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Black and White swapped during format conversion

    Any help will be greatly appreciated!!!

    I need to convert 8bpp/256-gray-scale/scanned tif image to 1bpp/b&w gif or png using the following command:

    i_view32 Thumb.tif /bpp=1 /convert=Thumb.png
    i_view32 Thumb.tif /bpp=1 /convert=Thumb.gif

    However, the resulting (i.e. converted) png or gif image has black and white swapped. What do I do to prevent B&W swapping? I could use the /swap_bw switch to correct the problem. HOWEVER, B&W swapping doesn't always happen. That is, some get swapped, some don't during a batch conversion of multiple tif files. Thanks.
    Attached Files
    Last edited by sigmabk; 24.11.2010, 07:53 PM. Reason: Attach file

    #2
    Originally posted by sigmabk View Post

    I uploaded the image files to RapidShare. Sorry, I don't know of any better file hosting service. Please download the following zip file if you can help.
    http://rapidshare.com/files/432697846/Thumb.zip
    Press the "Go Advanced" button and from the Additional Options use Attachments > Manage Attachments to upload your files to the forum. Then we can look at them without needing a Rapidshare account.

    Comment


      #3
      Sorry, it took me a while to figure out where the "Go Advanced" button was, noob here ... >_<

      The attachment download link is added to my original post. Thank you very much for trying to help, Mij.

      Comment


        #4
        When I ran your Thumb.tif with your commands it worked correctly (see attachments).
        I renamed them ThumbA because I already had your negative images saved in the folder).

        Irfanview will apply all the open, save or other options that have been left set in the program when you run the command line. I cannot think what options could have caused the reversal that you describe, so I recommend that you try to do the operation manually in the Irfanview program to see where the problem occurs.
        1. Open Thumb.tif from File menu
        2. Decrease color depth to 2 colors from Image menu
        3. Save As PNG (or GIF) from the File menu. Make sure you open the Save options when you do this to check what is set there.
        Attached Files

        Comment


          #5
          Originally posted by Mij View Post
          ... Irfanview will apply all the open, save or other options that have been left set in the program when you run the command line. ...
          I checked the i_view32.ini that was created automatically by i_view32.exe in the same folder. However, there's only one line in there setting the jpg quality to 80, nothing to do with color depth or swapping b&w. I've never run the GUI part of the program, so it shouldn't have any effect on the command counterpart. As I stated in the original post, if I batch convert multiple tifs, some will come out ok, the rest with b&w swapped. Freaky... Since I can't find anything in the ini file, will the program keep any settings in the registry?

          Thanks again.

          Comment


            #6
            I have now been able to reproduce your problem and think it may be a bug, sismabk.
            I will try a few ideas tomorrow and send you a private message.

            Comment


              #7
              Thanks for your PM, Mij. I replied, but forgot to save a copy to my "Sent" box. I'm not sure if you're getting my PM.

              I tried the test version you sent me and it worked. ALRIGHT!!! I'm eternally grateful. Since I only have a handful of thumbprints to test with right, I can't draw any conclusions yet. However, I'll keep you posted as I collect more prints.

              Happy holiday to you, Mij, and all our friends here !!!

              Comment

              Working...
              X