Convert from tiff to png not working fine

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
rokadeaks
Posts: 13
Joined: 2018-02-12T10:33:20-07:00
Authentication code: 1152

Convert from tiff to png not working fine

Post by rokadeaks »

I have real image like https://ufile.io/mihvx which is in tiff format.
When I use convert command to convert from tiff to png I got image as follow
https://ufile.io/l4eez

Can you please help me to know why this is happening or reason behind it
Last edited by rokadeaks on 2018-03-13T08:05:44-07:00, edited 4 times in total.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Convert from tiff to png not working fine

Post by snibgo »

The links don't work for me. The first seems to be to a web page that shows a png image, not tiff.

Please also show the exact command you used, and say what version of IM you used, on what platform.

EDIT to add: don't multi-post. I have deleted your other posts.
snibgo's IM pages: im.snibgo.com
rokadeaks
Posts: 13
Joined: 2018-02-12T10:33:20-07:00
Authentication code: 1152

Re: Convert from tiff to png not working fine

Post by rokadeaks »

First image is png because I have took screen shot of real image to show you how it should be.
Second is converted image with convert command.

image magick version :
Version: ImageMagick 6.9.8-10 Q16 x86_64 2017-07-15 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff webp wmf x xml zlib

Command:
convert.exe -limit memory 256MiB -limit map 1024MiB -limit disk 1024MiB -define bmp:format=bmp3 -antialias -quality 85 "D:/Mit Alphakanal und FSP nicht aktiviert.tif" -profile D:/icc/5f1da5cf806216e293f13f20d8ee680c.icc -intent Relative -black-point-compensation -profile sRGB.icc -colorspace srgb -resize "1280x1280>" "D:/thumbs/master.png"

even I tried with simple convert command on command prompt like:

convert "D:/Mit Alphakanal und FSP nicht aktiviert.tif" "D:/Test_master.png"

still I am getting wrong result

platform : on both window & linux
Last edited by rokadeaks on 2018-02-14T06:12:49-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert from tiff to png not working fine

Post by fmw42 »

Please repost your links to your images to some other hosting provider or fix them so they work. Your links require login to download.
rokadeaks
Posts: 13
Joined: 2018-02-12T10:33:20-07:00
Authentication code: 1152

Re: Convert from tiff to png not working fine

Post by rokadeaks »

Updated links
rokadeaks
Posts: 13
Joined: 2018-02-12T10:33:20-07:00
Authentication code: 1152

Re: Convert from tiff to png not working fine

Post by rokadeaks »

fmw42 wrote: 2018-02-13T10:02:57-07:00 Please repost your links to your images to some other hosting provider or fix them so they work. Your links require login to download.
updated links
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert from tiff to png not working fine

Post by fmw42 »

The file I get downloaded is still PNG in both cases. The input is not TIFF! Please try again.
rokadeaks
Posts: 13
Joined: 2018-02-12T10:33:20-07:00
Authentication code: 1152

Re: Convert from tiff to png not working fine

Post by rokadeaks »

@fmw42:
Updated links can you please have look
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert from tiff to png not working fine

Post by fmw42 »

try

Code: Select all

convert mit-alphakanal-und-fsp-nicht-aktiviert.tif -alpha off mit-alphakanal-und-fsp-nicht-aktiviert.png
rokadeaks
Posts: 13
Joined: 2018-02-12T10:33:20-07:00
Authentication code: 1152

Re: Convert from tiff to png not working fine

Post by rokadeaks »

@fmw42 : It's working thanks but
Can you please explain me what's the reason basically & why we need to do -alpha off
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert from tiff to png not working fine

Post by fmw42 »

Simply because your file showed no actual full transparency. So I simply tried turning alpha off and it worked.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert from tiff to png not working fine

Post by fmw42 »

You also have a clip path. If you want to use that to keep the background transparent, then try

Code: Select all

convert mit-alphakanal-und-fsp-nicht-aktiviert.tif -alpha transparent -clip -alpha opaque -strip result.png
rokadeaks
Posts: 13
Joined: 2018-02-12T10:33:20-07:00
Authentication code: 1152

Re: Convert from tiff to png not working fine

Post by rokadeaks »

Hi
I have existing command like this
convert.exe -limit memory 256MiB -limit map 1024MiB -limit disk 1024MiB -define bmp:format=bmp3 -antialias -quality 85 "D:/Mit Alphakanal Transparenz und FSP aktiviert.tif[0]" "(" +clone -threshold 100% -clip-path "frei" -alpha extract +clip -alpha copy ")" -compose copy_opacity -composite -profile D:/data/cache/icc/65f0b21506bf7bf8884ca1b0b9404565-0.icc -intent Relative -black-point-compensation -profile sRGB.icc -colorspace srgb -resize "1280x1280>" "D:/data/thumbs/master.png"


How we can add changes suggested by you in this command can you please guide
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert from tiff to png not working fine

Post by fmw42 »

I have no idea what you are trying to do. Can you explain? You command does not make sense to me. Why do you use -define bmp:format=bmp3 when you are creating a PNG output?
rokadeaks
Posts: 13
Joined: 2018-02-12T10:33:20-07:00
Authentication code: 1152

Re: Convert from tiff to png not working fine

Post by rokadeaks »

https://ufile.io/o5q81

Here on link we have zip file in which 4 tiff files are there for all those 4 files I wish to convert to png.
Can you please provide me generic command with which for all 4 files I should have same png image after conversion.
Post Reply