Search found 35 matches: tweakpng

Searched query: tweakpng

by xnview
Sun Feb 26, 2023 2:42 pm
Forum: New
Topic: [feat] edit pallete - cannot set transparency to multiple indexes
Replies: 5
Views: 1209

Re: 1.4.2 - edit pallete - cannot set transparency to multiple indexes

user0 wrote: Fri Feb 03, 2023 2:08 pm TweakPNG allows to edit alpha channel of individual color.
yes but not supported by XnView
by user0
Fri Feb 03, 2023 2:08 pm
Forum: New
Topic: [feat] edit pallete - cannot set transparency to multiple indexes
Replies: 5
Views: 1209

Re: 1.4.2 - edit pallete - cannot set transparency to multiple indexes

xnview wrote: Fri Feb 03, 2023 1:45 pm 8bits palette support only 1 index
What about test_png_B.png, is it still valid 8bit png?
TweakPNG allows to edit alpha channel of individual color.
test_png_A.png
test_png_A.png (178 Bytes) Viewed 880 times
TweakPNG_vs_xnview.png
test_png_B.png
test_png_B.png (486 Bytes) Viewed 880 times

Also note the handy indicator of transparency in TweakPNG (red oval on x scale under each color)

Related
by user0
Tue Nov 22, 2022 4:03 pm
Forum: Closed/Resolved
Topic: truncated metadata
Replies: 6
Views: 1239

Re: truncated metadata

xnview wrote: Tue Nov 22, 2022 3:29 pm sorry but i don't understand your problem...
he means that it is not possible to get full data from Dream and Sd-metadata fields via build-in ExifTool
exif_tool_trancates_metadata.png

for example, in TweakPNG it will be shown in modal dialog on double-click in the field
tweakpng_shows_all_data.jpg
by kytrin
Fri Jun 18, 2021 12:05 pm
Forum: Closed/Resolved
Topic: PNG Resizing Transparency Issue
Replies: 27
Views: 7144

Re: PNG Resizing Transparency Issue

XnTriq wrote: Fri Jun 18, 2021 3:45 am According to TweakPNG, …
  • 1344939-barbican-controls-down-ns-2x2.png is a 24-bit (truecolor) PNG + alpha channel = 32-bit (RGBA),
  • 1344899-barbican-1a-20x9.png is an 8-bit (indexed/palette-based) PNG with “cheap alpha” transparency.
Due to a limitation in XnView's library, an additional action (ImageChange color depth32 bits) is neccessary during batch conversion (prior to ImageResize) when you're dealing with “cheap alpha”. This extra step will ensure that transparency is preserved in all input files upon resizing.
Please make sure to use v0.98.2 or later.
YES! That worked perfectly! Oh my god, thank you SO MUCH! I am definitely going to share this for others having the same problem! You are the literal best! : :D
by XnTriq
Fri Jun 18, 2021 3:45 am
Forum: Closed/Resolved
Topic: PNG Resizing Transparency Issue
Replies: 27
Views: 7144

Re: PNG Resizing Transparency Issue

According to TweakPNG, …
  • 1344939-barbican-controls-down-ns-2x2.png is a 24-bit (truecolor) PNG + alpha channel = 32-bit (RGBA),
  • 1344899-barbican-1a-20x9.png is an 8-bit (indexed/palette-based) PNG with “cheap alpha” transparency.
Due to a limitation in XnView's library, an additional action (ImageChange color depth32 bits) is neccessary during batch conversion (prior to ImageResize) when you're dealing with “cheap alpha”. This extra step will ensure that transparency is preserved in all input files upon resizing.
Please make sure to use v0.98.2 or later.
by XnTriq
Sat Jan 18, 2020 9:00 am
Forum: Classic - Bug Reports
Topic: [Solved] Problem viewing certain PNG files
Replies: 3
Views: 6474

[Solved] Problem viewing certain PNG files

TweakPNG's validity check gives these PNGs a clean bill of health, and I can open them in Photoshop, Firefox etc., but XnView Classic/MP and MS Paint don't like them:
by XnTriq
Tue Sep 12, 2017 10:30 pm
Forum: New
Topic: Can't Open File
Replies: 44
Views: 8158

Re: Can't Open File

Brother Gabriel-Marie wrote:Right now I'm stuck with files that won't display, and I have no idea why. I can see them with any other program; just not MP. When I open a "broken" file in another program, say, Imagine (I use it as a plugin in FreeCommander) then it opens it fine. Photoshop opens them fine, too and nothing seems to be wrong with them.
I successfully opened your sample files with two dozen or more programs (including XnView MP). None of them had any problems whatsoever loading these images. Even all the diagnostic software I use on a regular basis (JPEGsnoop, TweakPNG, and Stuffware Photo Studio, to name but a few) gave them a clean bill of health.
by XnTriq
Sun Dec 25, 2016 4:30 am
Forum: Classic - General Support
Topic: Addons -> PNGOUT
Replies: 14
Views: 5820

Re: Addons -> PNGOUT

SharkD wrote:Do you know which browsers support grayscale+alpha channel? Because even if XnView does not support it, it still might be a good idea to use it on my website.
They're widely used, …
… and all modern web browsers support them “out of the box”.
Can I use… ([url=http://www.caniuse.com/#feat=png-alpha]PNG alpha transparency[/url] » Known issues) wrote:IE7 & 8 do not support PNG's alpha transparency when you apply CSS alpha filter on them or a parent element.
Useful tools:
by XnTriq
Sat Nov 26, 2016 3:45 am
Forum: Classic - Bug Reports
Topic: 2.39: Error opening png file
Replies: 5
Views: 1278

Re: 2.39: Error opening png file

Welcome to the forum, Stepa_ua.

I can confirm that XnView Classic v2.37 and v2.39 as well as MP v0.83 don't like SoftJig.png. I had no problem viewing it with v1.99 though, and TweakPNG gives it a clean bill of health.

Update:
Windows Picture and Fax Viewer
Windows Picture and Fax Viewer
p136095.png (19.37 KiB) Viewed 1267 times
by XnTriq
Sun Nov 20, 2016 11:15 pm
Forum: Classic - Bug Reports
Topic: 2.39: Gimp-made images crash XnView
Replies: 18
Views: 2695

Re: 2.39: Gimp-made images crash XnView

I don't have any problems opening Gradient.png either.
The file does not contain any metadata or a color profile.
TweakPNG wrote:

Code: Select all

Chunk | Length | CRC      | Attributes                | Contents
------+--------+----------+---------------------------+----------------------------------------------------------------
IHDR  |     13 | c69676e4 | critical                  | PNG image header: 640×400, 8 bits/sample, truecolor, interlaced
gAMA  |      4 | 0bfc6105 | ancillary, unsafe to copy | file gamma = 0.45455
bKGD  |      6 | a0bda793 | ancillary, unsafe to copy | background color = (255,255,255)
pHYs  |      9 | 009a9c18 | ancillary, safe to copy   | pixel size = 2835×2835 pixels per meter (72.0×72.0 dpi)
tIME  |      7 | 9d44472a | ancillary, unsafe to copy | time of last modification = 20 Nov 2016, 16:10:12 UTC
iTXt  |     29 | 642e6507 | ancillary, safe to copy   | text (international), key=“Comment”: “Created with GIMP”
IDAT  |   8192 | ce24ebab | critical                  | PNG image data
IDAT  |   8192 | 5191baca | critical                  | PNG image data
IDAT  |   8192 | 540c47ef | critical                  | PNG image data
IDAT  |   8192 | c1d270d1 | critical                  | PNG image data
IDAT  |   8192 | cd761d6d | critical                  | PNG image data
IDAT  |   8192 | 8ed13a12 | critical                  | PNG image data
IDAT  |   8192 | 1b6981a5 | critical                  | PNG image data
IDAT  |   8192 | 17a0503c | critical                  | PNG image data
IDAT  |   8192 | fa66f225 | critical                  | PNG image data
IDAT  |   8192 | f07a856b | critical                  | PNG image data
IDAT  |   8192 | 45b33ff2 | critical                  | PNG image data
IDAT  |   8192 | cb3d0844 | critical                  | PNG image data
IDAT  |   8192 | 3d0abd63 | critical                  | PNG image data
IDAT  |   8192 | 329de0f7 | critical                  | PNG image data
IDAT  |   8192 | 48a98318 | critical                  | PNG image data
IDAT  |   8192 | 880cd8f4 | critical                  | PNG image data
IDAT  |   8192 | b88cd8b2 | critical                  | PNG image data
IDAT  |   8192 | e720b281 | critical                  | PNG image data
IDAT  |   8192 | 395bd9da | critical                  | PNG image data
IDAT  |   8192 | bc6dac1a | critical                  | PNG image data
IDAT  |   8192 | 4e437488 | critical                  | PNG image data
IDAT  |   8192 | e4a4c4c8 | critical                  | PNG image data
IDAT  |   1322 | 11c5c22d | critical                  | PNG image data
IEND  |      0 | ae426082 | critical                  | end-of-image marker
by XnTriq
Sat Nov 12, 2016 6:45 am
Forum: Classic - General Support
Topic: Way to produce a transparent canvas?
Replies: 6
Views: 2048

Re: Way to produce a transparent canvas?

p135768.zip
(2.77 KiB) Downloaded 81 times
Contents of attachment:
  • 0_Example.png
    1_XnView_Truecolor+Alpha.png
    1_FireWorks_Truecolor+Alpha.png
    1_SuperPNG_Truecolor+Alpha.png
    2_XnView_Palette+Index.png
    2_FireWorks_Palette+Index.png
    2_PNGOptimizer_Palette+Index.png
    3_TweakPNG_Truecolor+tRNS.png (Ignored by XnView)
    4_FireWorks_Palette+Alpha.png (Supported by XnView since v1.97)
cday wrote:you might like this thread: https://www.diybookscanner.org/forum/vi ... 236#p20235
Maybe you have a better solution to the originating problem in the first post of the thread? :wink:
Will do :mrgreen:
by omniplex
Mon Jan 18, 2016 7:44 pm
Forum: Customization
Topic: Open with...
Replies: 0
Views: 10196

Open with...

XnView has an "open with" feature, i.e., if you right-click on a file you can select "open" F3 or "edit" F4 to get the same effect as in Windows explorer "open" or "edit". For images this is rather boring, "open" in explorer on my box starts XnView, so when I am already in XnView I rarely need F3. It is possible to define additional "open with" programs in XnView for any file, e.g., a hex. viewer better than the XnView built-in hex. viewer.

Disadvantages, when you want to get rid of a bad "open with" idea XnView only offers to delete everything, back to only F3 and F4. An additional "open with" tool works for any file, you cannot define something only for, say, PNG. Recently I decided that I want an "open command prompt here" feature also within XnView. And after that worked as expected I modified it to open tweakpng for PNG, or a command prompt for everything else. Eventually I arrived at a script opening exiftool -k for ICC / MIE / XMP, or dcraw -i -v for camera raw.

If you want similar "open with" functions you can copy and edit the code shown below, save it in a tools folder, where you have exiftool / dcraw / tweakpng / etc., and define it as "open with" application in XnView. For the latter XnView first offers to open an *.exe, but it is a simple plain text *.cmd, you have to select * to see all files including *.cmd, not only *.exe and also not only *.bat. The name doesn't matter, I use OPENDIR.cmd:

Code: Select all

@setlocal enableextensions & echo off
if not "%~2" == ""     call "%~0" "%*"
if not "%~2" == ""     goto :EOF
if     "%~1" == ""     goto HELP
if     "%~1" == "?"    goto HELP
if     "%~1" == "/?"   goto HELP
if     "%~1" == "-?"   goto HELP
set PADD=%~dp0;%PATH%;.
set NEED="%~1"
if not exist "%~f1"    goto NEED
set NEED="%~f1\."
if     exist "%~f1\*"  goto OKAY
set NEED="%~f1\.."
if /I "%~x1" == ".ICC" goto EXIF
if /I "%~x1" == ".ICM" goto EXIF
if /I "%~x1" == ".MIE" goto EXIF
if /I "%~x1" == ".PNG" goto PING
if /I "%~x1" == ".ARW" goto CRAW
if /I "%~x1" == ".CR2" goto CRAW
if /I "%~x1" == ".CRW" goto CRAW
if /I "%~x1" == ".DNG" goto CRAW
if /I "%~x1" == ".ERF" goto CRAW
if /I "%~x1" == ".KDC" goto CRAW
if /I "%~x1" == ".KRO" goto CRAW
if /I "%~x1" == ".MEF" goto CRAW
if /I "%~x1" == ".MRW" goto CRAW
if /I "%~x1" == ".NEF" goto CRAW
if /I "%~x1" == ".NRW" goto CRAW
if /I "%~x1" == ".ORF" goto CRAW
if /I "%~x1" == ".PEF" goto CRAW
if /I "%~x1" == ".RAF" goto CRAW
if /I "%~x1" == ".RAW" goto CRAW
if /I "%~x1" == ".RW2" goto CRAW
if /I "%~x1" == ".RWL" goto CRAW
if /I "%~x1" == ".SR2" goto CRAW
if /I "%~x1" == ".SRW" goto CRAW
goto OKAY
:EXIF --------------------------------------------------------------
set NEED=exiftool.exe
for %%x in (%NEED%) do if exist "%%~f$PADD:x" set NEED=%%~f$PADD:x
if     exist "%NEED%"  goto CALL
set NEED=exifgui.exe
for %%x in (%NEED%) do if exist "%%~f$PADD:x" set NEED=%%~f$PADD:x
if     exist "%NEED%"  goto OPEN
if not exist "%NEED%"  goto NEED
:PING --------------------------------------------------------------
set NEED=tweakpng.exe
for %%x in (%NEED%) do if exist "%%~f$PADD:x" set NEED=%%~f$PADD:x
if     exist "%NEED%"  goto OPEN
if not exist "%NEED%"  goto NEED
:CRAW --------------------------------------------------------------
set NEED=dcraw.exe
for %%x in (%NEED%) do if exist "%%~f$PADD:x" set NEED=%%~f$PADD:x
if not exist "%NEED%"  goto NEED
call "%NEED%" -i -v "%~f1"
goto WAIT
:OPEN --------------------------------------------------------------
start "%~n0" /D . "%NEED%" "%~f1"
goto :EOF
:CALL --------------------------------------------------------------
call "%NEED%" "%~f1"
goto WAIT
:NEED --------------------------------------------------------------
echo/
echo Error: %~nx0 found no %NEED%
:HELP --------------------------------------------------------------
echo Usage: %~nx0 FILE
echo/
echo Default action:  Open a command window (CMD.EXE) in the folder
echo of the specified existing FILE or subdirectory.
echo/
echo Edit this script to run another program depending on the FILE
echo extension, e.g., for a PNG start TWEAKPNG.EXE, or for MIE start
echo EXIFTOOL.EXE.
echo/
:WAIT --------------------------------------------------------------
set NEED="%CMDCMDLINE:)=%"
for /F "usebackq tokens=2" %%c in ('%NEED%') do if %%c == /c pause
goto :EOF
:OKAY --------------------------------------------------------------
endlocal & cd /D "%NEED%" & cmd /k title %~nx0
by omniplex
Mon Jan 11, 2016 9:25 pm
Forum: Classic - Bug Reports
Topic: certain PNGs cannot be saved
Replies: 9
Views: 4942

Re: certain PNGs cannot be saved

XnTriq wrote:Trying to do so with m96yxdgsf6j8.png
[...]
still results in an “error writing the file”.
2.35 can save this. The text chunks are gone (as promised), some 72 dpi pHYs chunk appears out of thin air, and the colour profile isn't identical (original: 2627 bytes, saved: 2520). Maybe libpng "upgrades" known colour profiles on the fly. :?

Unrelated, tweakpng is still at version 1.4.6, and I think its "import colour profile" feature is broken. But it can import complete colour profile chunks (exported from another PNG). Truepng.exe is at version 0.6.1.8, but I haven't tested yet if that fixes a truepng bug with odd PNG formats (IIRC 16bits grayscale didn't work for me with truepng 0.5.1.4.)
by XnTriq
Wed Dec 30, 2015 10:15 pm
Forum: Classic - Bug Reports
Topic: Error saving PNG
Replies: 18
Views: 17183

Re: Error saving PNG

Welcome back, omniplex :-)
omniplex wrote:
XnTriq wrote:
...
Can someone please confirm?
WFM.
THX.
omniplex wrote:Presumably you know deark mentioned in another thread, there is a working Windows 64bits binary in the tarball.
I knew about Jason Summers' site and use some of his software (TweakPNG in particular). deark escaped my notice, though. Wow! Danke for the hint :D
omniplex wrote:Something else you presumably know, but I didn't see it in the plugin thread, there are some free and some shareware Simple Filter plugins by a German photographer. The free versions work for me in XnView. The XnView ICC option claims to affect JPEG and TIFF, but actually it also works for PNG:
I've actually posted a link to SimpelFilter before but I failed to realize that they also have LE editions which are free. So again: Thank you for pointing this out!
omniplex wrote:The XnView ICC option claims to affect JPEG and TIFF, but actually it also works for PNG:

[…]

source
Interesting series of articles by SimpelFilter's head honcho 8)
(It's too bad that Heise had to shut down their UK operations.)