Background color becoming black from TIF to JPG conversion

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
Carter J
Posts: 116
Joined: 2013-12-19T02:20:09-07:00
Authentication code: 6789

Background color becoming black from TIF to JPG conversion

Post by Carter J »

Hi All,

We have a TIFF image and while converting TIFF file to JPG file, the background of the output image is becoming black.

When we tried with PHOTOSHOP the output JPG file is good and as expected.

https://www.dropbox.com/s/hmajdtaic215w ... toshop.jpg

Command used:
convert -alpha off -units pixelsperinch -resize 800X600 tif_bg_white.tiff[0] -profile /tmp/ICCProfiles/Recommended/USWebCoatedSWOP.icc tif_bg_white_IM.jpg

Output of Identify command:

identify -verbose tif_bg_white.tiff

Image: tif_bg_white.tiff
Format: TIFF (Tagged Image File Format)
Mime type: image/tiff
Class: DirectClass
Geometry: 2454x3681+0+0
Resolution: 300x300
Print size: 8.18x12.27
Units: PixelsPerInch
Type: TrueColorAlpha
Base type: TrueColor
Endianess: MSB
Colorspace: sRGB
Depth: 8/16-bit
Channel depth:
red: 16-bit
green: 16-bit
blue: 16-bit
alpha: 8-bit
Channel statistics:
Pixels: 9033174
Red:
min: 0 (0)
max: 255 (1)
mean: 17.4471 (0.0684201)
standard deviation: 61.3853 (0.240727)
kurtosis: 8.97908
skewness: 3.29325
Green:
min: 0 (0)
max: 255 (1)
mean: 21.774 (0.0853881)
standard deviation: 59.3175 (0.232618)
kurtosis: 4.59738
skewness: 2.49051
Blue:
min: 0 (0)
max: 255 (1)
mean: 20.4615 (0.0802411)
standard deviation: 55.7648 (0.218686)
kurtosis: 4.55944
skewness: 2.4855
Alpha:
min: 0 (0)
max: 255 (1)
mean: 30.9668 (0.121438)
standard deviation: 83.0799 (0.325804)
kurtosis: 3.38032
skewness: -2.31777
Image statistics:
Overall:
min: 0 (0)
max: 255 (1)
mean: 70.9289 (0.278153)
standard deviation: 65.7623 (0.257891)
kurtosis: 12.7601
skewness: 4.52543
Alpha: none #00000000
Rendering intent: Perceptual
Gamma: 0.454545
Chromaticity:
red primary: (0.64,0.33)
green primary: (0.3,0.6)
blue primary: (0.15,0.06)
white point: (0.3127,0.329)
Background color: white
Border color: srgba(223,223,223,1)
Matte color: grey74
Transparent color: none
Interlace: None
Intensity: Undefined
Compose: Over
Page geometry: 2454x3681+0+0
Dispose: Undefined
Iterations: 0
Compression: LZW
Orientation: TopLeft
Properties:
claro:Channel: RGB-CMYK conversion NEW
claro:SubFolder: .
claro:Version: 9.5.1
clst:ApplyBluetone: false
clst:ApplyBluetoneBrightness: false
clst:ApplyBluetoneSaturation: false
clst:ApplyGreentone: false
clst:ApplyGreentoneBrightness: false
clst:ApplyGreentoneSaturation: false
clst:ApplyRedEyeOnlyWhenFlashUsed: false
clst:ApplyRedEyeRemoval: false
clst:ApplySkintone: false
clst:ApplySkintoneBrightness: false
clst:ApplySkintoneSaturation: false
clst:AssumedICCProfileForCMYK: /usr/local/Elpical Claro/profiles/PSR_LWC_PLUS_V2_PT.icc
clst:AssumedICCProfileForGRAY: ./profiles/sGray.icc
clst:AssumedICCProfileForRGB: /usr/local/Elpical Claro/profiles/AdobeRGB1998.icc
clst:BlackPointSet: false
clst:BlackWhitePoint: false
clst:BlueBrightnessLevel: 0.0
clst:BlueSaturationLevel: 0.0
clst:BluetoneHue: 0.0
clst:BluetoneStrength: 0.0
clst:Brightness: false
clst:BrightnessLevel: 0.0
clst:ColorBalance: false
clst:Contrast: false
clst:ContrastLevel: 0.0
clst:DotGainCompensation: false
clst:EmbedProfile: true
clst:GreenBrightnessLevel: 0.0
clst:GreenSaturationLevel: 0.0
clst:GreentoneHue: 0.0
clst:GreentoneStrength: 0.0
clst:LocalContrast: false
clst:LocalContrastLevel: 0.0
clst:NoiseFilterLuminosityMode: false
clst:NoiseReduction: false
clst:OutOfGamutPerc: 101
clst:OutputBWProfileActive: false
clst:OutputColorProfile: /usr/local/Elpical Claro/profiles/PSR_LWC_PLUS_V2_PT.icc
clst:OutputColorProfileActive: true
clst:OutputRenderingIntent: RelativeColorimetric BPC
clst:RedEyeRemovalStrength: 0.0
clst:Saturation: false
clst:SaturationLevel: 0.0
clst:Sharpening: false
clst:SharpeningLevel: 0.0
clst:SkinBrightnessLevel: 0.0
clst:SkinSaturationLevel: 0.0
clst:SkintoneHue: 0.0
clst:SkintoneStrength: 0.0
clst:UseEmbeddedProfileAsSource: true
clst:UseOriginalRGB: true
clst:WhitePointSet: false
clst:WorkingRGBProfile: /usr/local/Elpical Claro/profiles/AdobeRGB1998.icc
comment: RRD-GBSPE-10325279
date:create: 2014-09-15T00:00:36-05:00
date:modify: 2014-03-03T18:47:16-06:00
dc:format: image/tiff
exif:ApertureValue: 5.375
exif:ExposureBiasValue: 0
exif:ExposureMode: 1
exif:ExposureProgram: 1
exif:ExposureTime: 0.00625
exif:Flash: 16
exif:FNumber: 6.3
exif:FocalLength: 75
exif:FocalPlaneResolutionUnit: 2
exif:ISOSpeedRatings: 100
exif:MeteringMode: 5
exif:PixelXDimension: 2454
exif:PixelYDimension: 3681
exif:ShutterSpeedValue: 7.375
exif:SubjectDistance: 0
exif:WhiteBalance: 1
icc:name: IEC 61966-2.1 Default RGB colour space - sRGB
photoshop:ColorMode: 3
photoshop:ICCProfile: sRGB IEC61966-2.1
signature: 778632f89952c78ff49cc61894b294408ce0055e02b95ce365e37164c189bd54
tiff:alpha: unassociated
tiff:artist: RRD-GBSPE-10325279
tiff:endian: msb
tiff:make: Canon
tiff:model: Canon EOS-1D X
tiff:photometric: RGB
tiff:rows-per-strip: 21
tiff:software: Adobe Photoshop CS6 (Macintosh)
tiff:timestamp: 2014:02:25 15:03:25
xmp:CreateDate: 2014-02-19T07:34:24Z
xmp:MetadataDate: 2014-02-25T15:03:25Z
xmp:ModifyDate: 2014-02-25T15:03:25Z
xmpMM:DocumentID: xmp.did:F87F117407206811822AEE36E80562AF
xmpMM:InstanceID: xmp.iid:F87F117407206811822AEE36E80562AF
xmpMM:OriginalDocumentID: xmp.did:F87F117407206811822AEE36E80562AF
Clipping path:
<?xml version="1.0" encoding="iso-8859-1"?>
<svg xmlns="http://www.w3.org/2000/svg" width="2454" height="3681">
<g>
<path fill-rule="evenodd" style="fill:#00000000;stroke:#00000000;stroke-width:0;stroke-antialiasing:false" d="
M 1217.62 2030.37
C 1215.99 2037.71 1215.16 2041.2 1215.39 2045.48
C 1215.64 2049.74 1215.19 2056.65 1213.85 2060.51
C 1212.33 2064.5 1210.12 2074.73 1210.24 2082.73
C 1210.32 2090.63 1209.56 2097.28 1208.06 2102.64
C 1206.57 2108 1204.75 2114.13 1204.79 2122.44
C 1204.67 2130.71 1202.06 2150.54 1202.01 2160.4
C 1202.05 2170.95 1200.57 2222.08 1200.43 2234.5
C 1199.19 2265.28 1194.1 2318.23 1191.68 2337.68
C 1189.29 2356.83 1183.96 2383.69 1183.38 2389.46
C 1182.67 2395.6 1178.97 2416.12 1178.27 2421.07
C 1177.57 2426.01 1175.37 2434.69 1177.17 2443.1
C 1178.94 2451.44 1177.48 2479.95 1176.07 2488.5
C 1174.5 2497.17 1172.24 2505.33 1169.13 2511.37
C 1166.1 2517.48 1162.32 2520.44 1164.53 2530.66
C 1166.45 2541.31 1167.49 2570.96 1167.12 2578.32
C 1166.61 2585.7 1167.04 2598.65 1168.55 2605.55
C 1170.05 2612.44 1172.89 2663.75 1175.09 2697.42
C 1176.94 2732.79 1177.62 2787.55 1181.65 2815.15
C 1183.59 2855.65 1180.96 2862.52 1181.64 2877.43
C 1181.8 2902.53 1179.14 2932.93 1185.04 2954.44
C 1188.96 2973.02 1191.42 2988.47 1188.07 2990.83
C 1193.72 3008.42 1202.5 3025.82 1203.43 3040.29
C 1204.25 3056.71 1204.1 3062.35 1210.46 3091.38
C 1216.44 3119.78 1218.72 3135.92 1218.73 3138.58
C 1219.68 3147.34 1230.3 3180.75 1231.82 3183.52
C 1233.59 3188.72 1235.82 3197.1 1239.02 3203.31
C 1242.99 3212.66 1251.22 3230.21 1252.23 3239.15
C 1252.86 3248.21 1253.9 3273.47 1246.74 3283.78
C 1245.47 3300.67 1245.33 3309.24 1241.62 3314.36
C 1237.85 3319.5 1233.55 3320.57 1218.47 3320.99
C 1161.99 3320.35 1148.69 3320.66 1148.69 3320.66
C 1148.53 3337.97 1147.75 3343.03 1147.75 3343.03
C 1144.95 3344.62 1134.98 3343.09 1134.98 3343.09
C 1135.2 3327.53 1134.99 3321.23 1134.99 3321.23
C 1125.85 3321.23 1123.72 3322.01 1123.43 3317.28
C 1122.95 3312.49 1120.46 3284.99 1120.46 3284.99
C 1118.84 3284.07 1116.8 3284.65 1115.18 3274.88
C 1113.34 3264.68 1111.64 3248.66 1110.97 3239.58
C 1110.35 3229.98 1112.68 3216.09 1105.52 3187.94
C 1099.89 3162.86 1095.56 3142.89 1095.52 3130.79
C 1095.48 3118.69 1095.35 3101.69 1109.24 3084.1
C 1105.18 3072.24 1104.54 3059.72 1103.78 3043.1
C 1102.59 3024.72 1103.27 3011.81 1103.27 3011.81
C 1095.34 3012.29 1072.89 3010.79 1073.1 3001.75
C 1073.39 2993.18 1072.88 2988.69 1077.41 2984.95
C 1077.74 2980.52 1078.56 2978.88 1080.49 2976.81
C 1079.58 2966.14 1074.21 2932.45 1074 2926.77
C 1067.92 2914.3 1062.78 2883.23 1058.22 2860.47
C 1053.89 2837.83 1040.69 2779.45 1037.24 2765.34
C 1033.69 2751.19 1018.53 2690.55 1016.45 2657.76
C 1013.15 2626.39 1008.45 2565.81 1008.63 2547.96
C 1008.8 2530.11 1009.92 2496.04 1010.59 2479.89
C 1010.57 2459.76 1008.17 2452.07 1016.42 2443.41
C 1016.48 2421.42 1015.58 2418.44 1022.28 2406.71
C 1023.03 2400.97 1023.65 2394.23 1020.09 2389.46
C 1016.59 2384.79 1014.66 2378.99 1018.95 2370.58
C 1019.19 2357.84 1019.85 2353.56 1022.98 2348.04
C 1018.81 2335.12 1015.71 2322.65 1021.15 2313.18
C 1021.71 2307.27 1022.7 2303.2 1018.54 2300.46
C 1014.31 2297.8 1010.76 2293.32 1017.84 2284.74
C 1016.61 2273.01 1005.88 2221.71 1004.13 2210.62
C 1002.38 2199.52 991.573 2129.09 990.061 2122.5
C 988.548 2115.92 972.011 2039.1 972.011 2039.1
C 965.621 2033.29 957.199 2032.39 967.339 2020.59
C 965.477 2017.7 963.625 2016.53 963.625 2016.53
C 960.446 2015.1 949.28 2009.51 948.047 1989.03
C 947.192 1968.73 948.567 1955 944.815 1949.08
C 941.111 1944.95 940.06 1944.33 939.843 1934.52
C 939.596 1924.81 937.323 1915.21 935.686 1911.22
C 934.049 1907.23 930.172 1897.47 931.066 1884.02
C 931.261 1857.54 928.781 1826.81 934.922 1807.36
C 940.355 1786.45 943.985 1773.77 946.118 1769.94
C 939.676 1747.7 925.178 1696.53 921.98 1684.84
C 918.379 1672.84 903.103 1625.81 898.964 1591.99
C 892.492 1556.78 886.058 1526.59 884.811 1521.78
C 883.566 1517.02 880.766 1490.89 881.806 1479.25
C 879.13 1472.04 876.4 1466.64 876.868 1454.91
C 877.196 1443.14 876.158 1382.61 876.138 1367.41
C 876.117 1352.21 874.962 1278.13 877.347 1248.53
C 876.904 1211.85 878.159 1164.26 878.586 1152.79
C 878.997 1141.37 881.244 1125.49 884.441 1111.24
C 880.232 1094.36 877.659 1085.06 891.153 1046.35
C 901.011 1021.83 906.744 1007.06 914.44 998.963
C 918.35 984.074 918.678 973.747 923.642 968.77
C 928.704 963.501 943.452 949.193 954.356 943.077
C 965.623 936.543 979.942 927.197 989.731 920.1
C 999.507 912.733 1024.45 893.908 1027.32 890.878
C 1029.42 887.339 1031.1 885.726 1036.39 883.553
C 1041.72 879.54 1044.8 877.06 1044.8 877.06
C 1045.08 874.673 1051.48 854.922 1056.41 846.47
C 1062.23 835.923 1071.76 820.198 1073.79 814.24
C 1075.83 808.282 1083.53 792.025 1085.69 782.229
C 1087.85 772.434 1093.17 749.17 1094.38 737.306
C 1095.6 725.443 1102.14 679.87 1106.67 662.594
C 1111.2 645.318 1118.66 611.019 1137 582.781
C 1152.32 548.988 1163.93 511.794 1223.32 493.074
C 1248.47 487.538 1270.44 486.182 1277.12 493.378
C 1282.98 495.067 1287 498.652 1291.46 498.84
C 1295.92 499.027 1308.02 499.104 1311.64 504.209
C 1323.21 506.508 1340.64 514.461 1348.71 517.131
C 1357.04 519.872 1384.27 534.374 1391.28 541.727
C 1402.73 548.934 1411.28 554.621 1414.29 559.389
C 1421.63 566.107 1435.45 573.243 1439.15 578.532
C 1444.14 584.566 1448.16 587.222 1445.57 592.9
C 1442.98 598.577 1436.35 615.638 1436.35 615.638
C 1435.86 642.017 1437.69 671.46 1431.64 686.307
C 1429.78 692.228 1426.14 699.609 1423.36 703.986
C 1420.32 708.322 1415.92 716.04 1419.67 724.219
C 1423.69 732.533 1426.2 737.282 1428.3 745.765
C 1430.42 754.221 1433.73 758.678 1436.15 762.544
C 1438.57 766.41 1438.87 774.798 1433.11 777.851
C 1427.46 780.779 1414.58 780.503 1412.34 780.704
C 1411.45 782.29 1410.8 781.859 1411.43 787.827
C 1412.14 794.105 1415.4 803.708 1404.44 808.256
C 1405.45 814.928 1408.79 821.174 1401.68 826.931
C 1400.16 827.944 1393.89 831.239 1391.53 832.289
C 1389.17 833.34 1387.95 834.484 1388.1 838.502
C 1388.29 842.705 1390.64 852.704 1383.43 861.596
C 1378.67 867.114 1373.03 872.988 1353.1 870.427
C 1335.44 867.977 1323.31 861.689 1318.46 859.249
C 1313.61 856.808 1297.78 846.634 1282.71 853.645
C 1273.91 858.89 1266.47 864.972 1264.32 869.259
C 1262.04 873.558 1258.02 883.541 1256.39 887.174
C 1254.79 891.153 1252.4 898.867 1252.4 898.867
C 1254.1 901.598 1256.72 903.194 1261.96 906.505
C 1266.93 909.819 1279.16 920.006 1285.85 920.92
C 1298.52 923.754 1336.3 935.606 1339.88 938.989
C 1351.7 939.693 1361.58 937.078 1370.76 950.213
C 1381.03 959.935 1386.84 962.14 1398.24 978.913
C 1407.52 988.954 1410.25 991.336 1411.59 991.872
C 1413 992.501 1413.08 993.479 1412.13 994.801
C 1411.02 996.274 1410.04 998.523 1411.16 1000.93
C 1412.36 1003.63 1418.35 1016.84 1418.37 1027.46
C 1418.25 1038 1416.09 1049.13 1415.49 1056.28
C 1413.76 1077.18 1411.31 1125.5 1409.6 1136.29
C 1407.89 1147.08 1401.38 1196.51 1401.26 1199.01
C 1405.92 1212.35 1409.77 1219.74 1408.4 1239.35
C 1406.83 1258.94 1399.63 1278.98 1396.56 1284.38
C 1398.29 1331.99 1400.39 1381.71 1400.87 1403.7
C 1401.4 1425.98 1401.86 1444.51 1410.45 1472.57
C 1419.4 1502.43 1428.53 1520.94 1434.93 1561.15
C 1441.33 1601.36 1445.06 1621 1448.77 1639.03
C 1452.34 1658.55 1456.44 1675.12 1459.48 1705.76
C 1463.75 1730.91 1467.1 1741.58 1463.72 1743.9
C 1470.58 1777.73 1483.26 1828.26 1487.09 1843.61
C 1490.88 1859.08 1492.58 1869.48 1492.73 1877.48
C 1492.88 1885.47 1493.05 1896.91 1495.48 1907.43
C 1498.5 1921.6 1507.01 1961.85 1509.89 1975.08
C 1513.33 1992.27 1515.24 2002.32 1516.3 2005.68
C 1517.36 2009.03 1518.77 2016.84 1517.52 2020.49
C 1515.75 2023.96 1511.51 2028.36 1510.83 2036.52
C 1509.71 2044.97 1503.45 2063.04 1499.81 2069.7
C 1496.11 2076.95 1496 2079.72 1488.88 2085.58
C 1482.52 2092.12 1479.46 2094.51 1479.46 2094.51
C 1477.72 2134.39 1472.4 2179.27 1467.02 2200.03
C 1462 2222.56 1458.98 2237.12 1457.58 2245.56
C 1455.99 2254.11 1453.07 2267.28 1452.55 2272.88
C 1451.98 2278.62 1452.4 2288.33 1450.8 2293.02
C 1448.93 2298.07 1446.65 2307.05 1450.55 2313.08
C 1454.25 2319.11 1455.72 2320.96 1453.12 2326.15
C 1450.39 2331.32 1447.33 2333.37 1447.13 2337.99
C 1446.93 2342.6 1450.09 2347.52 1447.89 2358.01
C 1446.36 2371.15 1447.29 2377.96 1447.29 2377.96
C 1452.18 2385.38 1457.89 2388.37 1452.89 2396.57
C 1447.09 2401.81 1445.73 2404.9 1445.73 2404.9
C 1445.76 2421.38 1446.04 2424.45 1446.68 2426.95
C 1447.31 2429.46 1447.95 2431.9 1446.7 2435.59
C 1445.45 2439.27 1445.22 2442.21 1447.21 2447.19
C 1449.48 2454.03 1453.1 2466.49 1449.84 2473.98
C 1446.39 2481.59 1444 2494.02 1445.18 2504.13
C 1443.55 2562.19 1440.83 2592.38 1435.84 2630.32
C 1430.43 2668.71 1423.82 2700.33 1421.54 2720.46
C 1416.94 2742.65 1413.48 2753.12 1411.78 2771.77
C 1407.54 2797.31 1403.87 2824.09 1402.28 2833.14
C 1400.5 2842.49 1397.59 2861.86 1396.52 2870.05
C 1394.19 2903.53 1393.9 2909.8 1391.73 2915.11
C 1390.54 2939.29 1389.28 2944.25 1389.28 2944.25
C 1388.55 2961.05 1388.56 2964.21 1388.56 2964.21
C 1388.94 2968.64 1390.65 2975.39 1386.82 2976.74
C 1385.85 2983.64 1386.66 2985.92 1384.5 2986.27
C 1382.23 2986.71 1380.84 2984.1 1380.82 2977.82
C 1376.38 2979.79 1367.83 2979.36 1365.47 2976.22
C 1363.25 2977.52 1362.21 2978.46 1362.21 2978.46
C 1359.4 3001.6 1358.43 3032.2 1358.7 3042.73
C 1358.79 3053.58 1359.13 3061.88 1357.04 3066.42
C 1354.94 3070.95 1353.99 3077.63 1356.15 3091.56
C 1358.7 3105.76 1360.45 3116.34 1361.13 3129.05
C 1361.87 3143.25 1363.17 3161.04 1364.34 3164.72
C 1370.93 3186.22 1376.09 3207.11 1383.48 3218.35
C 1390.8 3229.66 1395.37 3230.13 1394.86 3246.24
C 1394.42 3262.08 1393.85 3276.44 1390.72 3279.34
C 1389.23 3294.66 1388.94 3310.68 1384.44 3315.14
C 1379.82 3319.43 1380.2 3322.52 1359.86 3320.85
C 1322.82 3317.86 1285.57 3316.32 1285.57 3316.32
C 1284.9 3336.82 1284.24 3340.51 1284.24 3340.51
C 1280.2 3341.45 1270.49 3340.27 1270.49 3340.27
C 1270.86 3309.43 1270.67 3280.27 1270.25 3279.07
C 1269.11 3277.08 1267.24 3272.36 1266.57 3257.75
C 1265.75 3243.23 1264.87 3210.85 1263.85 3206.89
C 1262.77 3202.86 1256.48 3180.37 1252.99 3170.24
C 1249.45 3160.11 1240.52 3140.85 1240.75 3137.37
C 1237.28 3132.54 1234.34 3121.92 1232.96 3110.86
C 1231.64 3099.77 1234.65 3088.89 1240.33 3078.83
C 1246.07 3068.69 1249.13 3059.2 1251.64 3051.83
C 1254.16 3044.47 1261.63 3035.34 1267.8 3030.64
C 1270.72 3024.52 1272.62 3016.4 1274.06 3004.68
C 1275.5 2992.98 1277.91 2972.1 1277.91 2972.1
C 1274.04 2970.6 1272.28 2970.47 1272.36 2967.51
C 1272.44 2964.33 1273.29 2959.34 1273.41 2957.03
C 1273.4 2953.65 1273.75 2949.12 1274.74 2947.44
C 1273.49 2943.11 1274.48 2929.69 1274.23 2923.96
C 1271.94 2893.07 1270.31 2873.18 1275.09 2835.51
C 1277.09 2796.34 1275.5 2749.85 1274.3 2729.27
C 1273.23 2708.61 1272.76 2665.81 1275.33 2632.63
C 1278.64 2598.2 1282.64 2576.85 1284.21 2568.05
C 1283.4 2553.72 1282.23 2543.22 1293.07 2527.41
C 1286.25 2514.88 1278.5 2503.47 1297.65 2476.08
C 1292.46 2468.48 1288.69 2464.24 1295.1 2452.53
C 1294.64 2439.05 1294.22 2435.42 1294.22 2435.42
C 1284.32 2429.68 1276.51 2422.84 1288.68 2406.81
C 1282.9 2402.96 1278.58 2396.26 1285.45 2382.82
C 1287.08 2375.82 1286.09 2369.37 1283.64 2365.66
C 1280.87 2361.93 1280.24 2355.73 1285.08 2346.05
C 1286.22 2320.92 1284.56 2279.61 1284.56 2279.61
C 1279.72 2276.4 1273.1 2272.3 1282.71 2256.38
C 1282.42 2254.11 1280.62 2248.56 1278.83 2240.9
C 1276.33 2223.06 1273.62 2204.9 1271.94 2201.7
C 1269.99 2198.31 1267.43 2190.88 1268.3 2181.91
C 1261.43 2157.15 1252.96 2132.3 1250.47 2125.86
C 1248.03 2119.35 1241.31 2099.62 1238.52 2086.79
C 1235.38 2073.66 1229.15 2063.92 1227.64 2053.1
C 1224.49 2038.85 1220.79 2030.49 1217.62 2030.37 Z
M 987.325 1552.94
C 991.296 1543.69 1000.16 1520.91 1007.92 1505.64
C 1015.8 1490.08 1022.99 1479.54 1025.7 1471.77
C 1028.5 1463.91 1033.13 1452.05 1032.45 1448.31
C 1029.02 1435.6 1021.72 1409.86 1018.93 1394.71
C 1015.13 1378.67 1004.92 1350.56 1002.93 1339.6
C 1000.34 1327.72 995.917 1314.96 995.917 1314.96
L 993.72 1315.38
C 990.967 1345.03 987.341 1371 984.538 1384.89
C 981.909 1399.66 977.869 1424.06 976.786 1435.54
C 975.491 1447.17 973.534 1478.07 973.501 1482.21
C 973.05 1491.79 971.766 1502.25 973.511 1507.36
C 980.274 1530.4 982.699 1538.02 983.78 1542.22
C 985.632 1547.86 987.325 1552.94 987.325 1552.94 Z
"/>
</g>
</svg>

Profiles:
Profile-8bim: 23532 bytes
Profile-icc: 3144 bytes
Profile-tiff:37724: 1972552 bytes
Profile-xmp: 19098 bytes
Artifacts:
filename: tif_bg_white.tiff
verbose: true
Tainted: False
Filesize: 4.772MB
Number pixels: 9.033M
Pixels per second: 17.37MB
User time: 0.500u
Elapsed time: 0:01.519
Version: ImageMagick 6.8.9-8 Q16 x86_64 2014-10-01 http://www.imagemagick.org

Any Insight???
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Background color becoming black from TIF to JPG conversi

Post by snibgo »

You turn off alpha (transparency), so those pixels will be whatever they are. Instead of "-alpha off", try "-background white -alpha remove".

However, you have a clip layer, and may want to do something with that. See http://imagemagick.org/script/command-l ... s.php#clip
snibgo's IM pages: im.snibgo.com
Carter J
Posts: 116
Joined: 2013-12-19T02:20:09-07:00
Authentication code: 6789

Re: Background color becoming black from TIF to JPG conversi

Post by Carter J »

Thanks for the quick response.

As you suggested, Converted the Tiff Image by removing "-alpha off" from the command, but the output image was same.
Command used:
convert -units pixelsperinch -resize 800X600 tif_bg_white.tiff[0] -profile /tmp/ICCProfiles/Recommended/USWebCoatedSWOP.icc tif_bg_white_IM.jpg

And even tried with including the -clip in the command, the output was not as expected. Please find output image in the below link:
convert -units pixelsperinch -resize 800X600 tif_bg_white.tiff[0] -clip -profile /tmp/ICCProfiles/Recommended/USWebCoatedSWOP.icc tif_bg_white_IM_removeclip.jpg
https://www.dropbox.com/s/i9xc6ueeq87hy ... veclip.jpg

Regards,
Carter
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Background color becoming black from TIF to JPG conversi

Post by fmw42 »

convert -units pixelsperinch -resize 800X600 tif_bg_white.tiff[0] -profile /tmp/ICCProfiles/Recommended/USWebCoatedSWOP.icc tif_bg_white_IM.jpg
Try reading the input before the resize operator for proper IM 6 syntax. You can add -background white -flatten or as snibgo suggested -background white -alpha remove. Change the color from white to whatever you want for the background

Code: Select all

convert tif_bg_white.tiff[0] -background white -flatten -resize 800x600 -units pixelsperinch -profile /tmp/ICCProfiles/Recommended/USWebCoatedSWOP.icc tif_bg_white_IM.jpg
If the input in already CMYK, you may need to convert to sRGB before processing and then convert back to CMYK if you want the output to be CMYK. That means you need to put one or two profiles before the resize depending whether the input has a profile or not. If it has a CMYK profile then just one sRGB profile can be supplied. If it has no profile and you know it is CMYK, then you need a CMYK profile followed by an sRGB profile. You still need the final CMYK profile. Someone with more profile experience than I can correct me.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Background color becoming black from TIF to JPG conversi

Post by snibgo »

Carter J wrote:As you suggested, Converted the Tiff Image by removing "-alpha off" from the command, but the output image was same.
Converting to JPG will turn off any alpha because JPG can't store alpha. If you want transparent pixels to be a particular colour such as white, you need "-background white -alpha remove" or "-background white -flatten" or similar.
fmw42 wrote:If the input in already CMYK, ...
From the "identify" output, we know the input is sRGB, with a profile.
snibgo's IM pages: im.snibgo.com
Carter J
Posts: 116
Joined: 2013-12-19T02:20:09-07:00
Authentication code: 6789

Re: Background color becoming black from TIF to JPG conversi

Post by Carter J »

@snibgo, I have another file with same transparency.

Included the identify command output in the following text file
https://www.dropbox.com/s/62xioufprt5un ... tifyOP.txt

My question is both the files (tif_bg_white.tiff and BG_trans_CMYK.tiff) have transp background. I have used the same command for both images.

convert -alpha off -units pixelsperinch -resize 800X600 BG_trans_CMYK.tiff[0] -profile /tmp/ICCProfiles/Recommended/USWebCoatedSWOP.icc BG_trans_CMYK.jpg
Output Image of above command is as expected where the below command is not able to produce:
convert -alpha off -units pixelsperinch -resize 800X600 tif_bg_white.tiff[0] -profile /tmp/ICCProfiles/Recommended/USWebCoatedSWOP.icc tif_bg_white.jpg


I tried with including the "-background white -flatten" as follows
convert -units pixelsperinch -resize 800X600 tif_bg_white.tiff[0] -background white -flatten -profile /ImageMerchant/config/ICCProfiles/Recommended/USWebCoatedSWOP.icc tif_bg_white.tiff_BackGround_white_flat.jpg

It working fine for me with the above command.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Background color becoming black from TIF to JPG conversi

Post by snibgo »

You are using non-standard syntax. IM expects operations to be specified in a logical order, and will execute them in that order. Resizing and flattening should be done only when the image has been read. (For historical reasons, commands often work when specified in a weird order. Bt don't rely on this.)
snibgo's IM pages: im.snibgo.com
Post Reply