Try incron. It is available in most distributives via same-named package. I will use Debian and CentOS as examples, as long as it covers almost all cases.
Steps are like that:
1) Install incron
# For Debian
apt-get install incron
# For CentOS
yum install incron
In CentOS you will also need to manually start and enable it.
# For CentOS6
chkconfig incrond on
service incrond start
# For CentOS7
systemctl enable incrond.service
systemctl start incrond.service
2) Add your user to allowed in file /etc/incron.allow (just add username)
3) Add incrontab rule with command incrontab -e
Rule would be like that:
/full/path/to/your/directory/ IN_CREATE your_script $#
IN_CREATE is event of creating file or directory in watched dir.
your_script is the name of your script, that takes the file and does all the work.
$# is name of file, that triggered the event.
In your case you need to change the extension of the file, so it is better to create some simple script, that takes the file and performs all actions.
Something like that (I tried to check everything, but it still can contain errors - check manually before using):
#!/bin/bash
# Setting constants
output_extension='.png'
path_to_save_files='/full/path/to/needed/folder/'
# Using quotes and $@ to catch files with whitespaces
input_file="$@"
# Verifying input extension
[[ "$input_file" =~ ".*\.txt" ]] || exit
# Cutting everything from the start to last '/' appeared
input_name=${input_file##/*/}
# Cutting everything from the end to first '.' appeared
short_name="${input_name%.*}"
# Creating full name for output file
output_name="${short_name}${output_extension}"
# Creating full path for your output file
output_file="${path_to_save_files}${output_name}"
# Performing your command at last
qrencode -o "$output_file" "$input_file"