Thursday, July 30, 2015

Ubuntu: Open images using IrfanView

#!/usr/bin/python3
#
# Put the file, for example in: /home/marcin/bin/startirfan.py
# and mark it as executable: chmod +x /home/marcin/bin/startirfan.py
#
# Make IrfanViewMine.desktop in /home/marcin/.local/share/applications that contains:
#
# [Desktop Entry]
# Encoding=UTF-8
# Name=MineIrfanView348
# Comment=IrfanView 3.48
# Exec=/home/marcin/bin/startirfan.py %u
# Terminal=false
# Type=Application
# Icon=B68D_i_view32.0
# Categories=Application;Utility;ImageEditor;
# StartupNotify=true
# MimeType=text/plain;
# NoDisplay=true
import getpass
import os
import sys
current_user = getpass.getuser();
wine_prefix = 'env WINEPREFIX="/home/{}/.wine" '.format(current_user)
wine_cmd = wine_prefix + 'wine "C:\Program Files\IrfanView\i_view32.exe" '
if len(sys.argv) == 2:
img_file = sys.argv[1]
img_file = "Z:\\" + img_file.replace('/', '\\')
wine_cmd += '"'+img_file+'"'
print(wine_cmd)
os.system(wine_cmd)
view raw startirfan.py hosted with ❤ by GitHub
To start gimp from IfranView:
#!/usr/bin/python3
#
# add this, for example, /home/marcin/bin/startgimp.py
# to IfranViews Miscellaneus Properties/Settings
#
import os
import sys
gimp_cmd = '/usr/bin/gimp-2.8 '
if len(sys.argv) == 2:
img_file = sys.argv[1]
img_file = img_file.replace('\\', '/')
img_file = img_file.replace('Z:', '')
gimp_cmd += '"'+img_file+'"'
#with open('/home/marcin/Desktop/test.txt', 'w') as f:
# f.write(img_file)
#print(gimp_cmd )
os.system(gimp_cmd )
view raw startgimp.py hosted with ❤ by GitHub

Ubuntu: irfanview start from command line example

wine "C:\Program Files\IrfanView\i_view32.exe" "Z:\mnt\e\DCIM\100D5300\DSC_7791.JPG"

Tuesday, July 21, 2015

LG 43UF770 4K TV with gtx 960 running at 4K at 60Hz and chroma 4:4:4

This is complementary info to the one in here. I have LG 43UF770T and Gigabyte GTX 960 G1 Gaming 4GB. The PC is set to 4K@60Hz and connected to the tv using HDMI 1 port. Only this port supports HDMI ULTRA HD Deep Colour in this tv. By default HDMI 1 icon is HDMI and HDMI ULTRA HD Deep Colour is off as written above. This results in chroma 4:2:0. I changed the setting as per instructions here, i.e. HDMI 1 port icon to PC and HDMI ULTRA HD Deep Colour to On. The nvidia settings are shown below.




To test the chroma for the default setup and the new one I used chroma torture test.

The results are here:

As can be seen, the top red, middle blue and bottom text is unreadable with the default tv settings on HDMI 1 port. With the new settings, everything is clear.