I am very new to this. I don't understand anything about the details of images - I just need to write a simple command line to convert PNG to TIFF. I have been able to do that with this NConvert - however, the background in the converted file is blank, and the original is white.
Is there an easy way to help me understand what parameters I need to set in order to achieve that?
Last thing - I was looking for a way to convert the image to grayscale and I have not found that. Can you help me?
thank you.
Need help converting PNG to TIFF [Solved]
Moderators: XnTriq, helmut, xnview
-
- XnThusiast
- Posts: 4185
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: Need help converting PNG to TIFF
If you search online for "TIFF transparency" without quotes, I think you will find as I have just done that the TIFF format does not directly support transparency, although there may be some at least partial workarounds...
I believe this is the relevant option:I was looking for a way to convert the image to grayscale and I have not found that. Can you help me?
Code: Select all
-grey num : Convert in Grey Scale (256, 128, 64, 32, 16, 8 or 4)
-
- Posts: 1
- Joined: Wed Nov 16, 2022 12:08 am
- Location: New Jersey
Re: Need help converting PNG to TIFF
It worked for me. cday, thank you.cday wrote: ↑Mon Nov 14, 2022 7:45 amIf you search online for "TIFF transparency" without quotes, I think you will find as I have just done that the TIFF format does not directly support transparency, although there may be some at least partial workarounds...
I believe this is the relevant option:I was looking for a way to convert the image to grayscale and I have not found that. Can you help me?
The use of 'Grey Scale' rather than 'greyscale' or 'grayscale' makes that option harder than it might be to find...Code: Select all
-grey num : Convert in Grey Scale (256, 128, 64, 32, 16, 8 or 4)
Loans for NJ residents https://njpdlstar.com. Contact us.
-
- Posts: 3
- Joined: Mon Nov 14, 2022 1:33 am
Re: Need help converting PNG to TIFF
Hello - and thank you for your quick response. And I must apologize in advance because I mistyped my question / request. the converted tiff has a 'black' background - not 'blank'. I'm attaching the before and after files. The original is a PNG. The converted is a TIF. Lastly - I'm attaching the NConvert command I used.
You do not have the required permissions to view the files attached to this post.
-
- XnThusiast
- Posts: 4185
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: Need help converting PNG to TIFF
Your image nconvert_png_original.PNG saves directly to a TIFF with a white background in XnView MP, I don't know why that isn't the case with your NConvert code above...
Pierre?
Pierre?
-
- XnThusiast
- Posts: 4185
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: Need help converting PNG to TIFF
I have now tested your source file and code using NConvert 7.99, and the output is a TIFF image with a white background:
My test was a quick test in Windows 10, which I hate, but I believe that it was valid.
Note:
If you are unable to reproduce that result, you might very speculatively test whether either of the following options could be needed in you code, possibly a default setting is different in your current installation??
Code: Select all
nconvert -out tiff png_original.png
My test was a quick test in Windows 10, which I hate, but I believe that it was valid.
Note:
If you are unable to reproduce that result, you might very speculatively test whether either of the following options could be needed in you code, possibly a default setting is different in your current installation??
Code: Select all
-bgcolor red green blue: Background color (for rotate/canvas)
-bgcolor2 red green blue alpha: Background color (for rotate/canvas)
You do not have the required permissions to view the files attached to this post.
-
- Posts: 3
- Joined: Mon Nov 14, 2022 1:33 am
Re: Need help converting PNG to TIFF
Hello. Thank you for the quick response. I have now confirmed that the .png files do have a transparent background. I confirmed this because I moved the original .png to my local pc (which has a dark background) and the background was in fact black. There was not an issue using the converter.
Thank you for all of your help. I apologize that I did not make that connection earlier - and as you mentioned, no direct support for Transparency - which is fine because the actual files I will be receiving to convert would not have transparency. I was just testing on all kinds of files to determine if the program worked for my needs.
Thank you again.
Thank you for all of your help. I apologize that I did not make that connection earlier - and as you mentioned, no direct support for Transparency - which is fine because the actual files I will be receiving to convert would not have transparency. I was just testing on all kinds of files to determine if the program worked for my needs.
Thank you again.
-
- Moderator & Librarian
- Posts: 6387
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: Need help converting PNG to TIFF
TIFF is widely used by professionals, and it has always supported transparency.
https://en.wikipedia.org/wiki/Transparency_(graphic) wrote:Raster file formats that support transparency include GIF, PNG, BMP, TIFF, TGA and JPEG 2000, through either a transparent color or an alpha channel.
-
- XnThusiast
- Posts: 4185
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: Need help converting PNG to TIFF
-
- Moderator & Librarian
- Posts: 6387
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk