Search Results

Search found 4 results on 1 pages for 'mhc'.

Page 1/1 | 1 

  • Automating the choice between JPEG and PNG with a script

    - by MHC
    Choosing the right format to save your images in is crucial for preserving image quality and reducing artifacts. Different formats follow different compression methods and come with their own set of advantages and disadvantages. JPG, for instance is suited for real life photographs that are rich in color gradients. The lossless PNG, on the other hand, is far superior when it comes to schematic figures: Picking the right format can be a chore when working with a large number of files. That's why I would love to find a way to automate it. A little bit of background on my particular use case: I am working on a number of handouts for a series of lectures at my unversity. The handouts are rich in figures, which I have to extract from PDF-formatted slides. Extracting these images gives me lossless PNGs, which are needlessly large at times. Converting these particular files to JPEG can reduce their size to up to less than 20% of their original file size, while maintaining the same quality. This is important as working with hundreds of large images in word processors is pretty crash-prone. Batch converting all extracted PNGs to JPEGs is not an option I am willing to follow, as many if not most images are better suited to be formatted as PNGs. Converting these would result in insignificant size reductions and sometimes even increases in filesize - that's at least what my test runs showed. What we can take from this is that file size after compression can serve as an indicator on what format is suited best for a particular image. It's not a particularly accurate predictor, but works well enough. So why not use it in form of a script: I included inotifywait because I would prefer for the script be executed automatically as soon as I drag an extracted image into a folder. This is a simpler version of the script that I've been using for the last couple of weeks: #!/bin/bash inotifywait -m --format "%w%f" --exclude '.jpg' -r -e create -e moved_to --fromfile '/home/MHC/.scripts/Workflow/Conversion/include_inotifywait' | while read file; do mogrify -format jpg -quality 92 "$file" done The advanced version of the script would have to be able to handle spaces in file names and directory names preserve the original file names flatten PNG images if an alpha value is set compare the file size between the temporary converted image and its original determine if the difference is greater than a given precentage act accordingly The actual conversion could be done with imagemagick tools: convert -quality 92 -flatten -background white file.png file.jpg Unfortunately, my bash skills aren't even close to advanced enough to convert the scheme above into an actual script, but I am sure many of you can. My reputation points on here are pretty low, but I will gladly award the most helpful answer with the highest bounty I can set. References: http://www.formortals.com/introducing-cnb-imageguide/, http://www.turnkeylinux.org/blog/png-vs-jpg Edit: Also see my comments below for some more information on why I think this script would be the best solution to the problem I am facing.

    Read the article

  • How do I change Clementine's play/pause indicator icons?

    - by MHC
    This is how the Clementine indicator displays play/pause: It's a minor detail, but I feel that the play and pause icons just don't go with the monochrome design of the panel. In order to change them I tried to locate all files associated with clementine, but to no avail. Here's the output: /home/user/.config/Clementine/clementine.db /usr/bin/clementine /usr/share/app-install/desktop/clementine:clementine.desktop /usr/share/app-install/icons/application-x-clementine.png /usr/share/applications/clementine.desktop /usr/share/doc/clementine /usr/share/doc/clementine/README.Debian /usr/share/doc/clementine/changelog.Debian.gz /usr/share/doc/clementine/copyright /usr/share/icons/hicolor/64x64/apps/application-x-clementine.png /usr/share/icons/hicolor/scalable/apps/application-x-clementine.svg /usr/share/icons/ubuntu-mono-dark/apps/24/clementine-panel-grey.png /usr/share/icons/ubuntu-mono-dark/apps/24/clementine-panel.png /usr/share/icons/ubuntu-mono-light/apps/24/clementine-panel-grey.png /usr/share/icons/ubuntu-mono-light/apps/24/clementine-panel.png /usr/share/man/man1/clementine.1.gz /usr/share/menu/clementine /usr/share/pixmaps/clementine-16.xpm /usr/share/pixmaps/clementine.xpm /var/lib/dpkg/info/clementine.list /var/lib/dpkg/info/clementine.md5sums /var/lib/dpkg/info/clementine.postinst /var/lib/dpkg/info/clementine.postrm /var/lib/menu-xdg/applications/menu-xdg/X-Debian-Applications-Sound-clementine.desktop Can anyone tell me where to find these icons and how to change them?

    Read the article

  • All files on automounted NTFS partition are marked as executable

    - by MHC
    I have set up an NTFS partition to automount via fstab: # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc nodev,noexec,nosuid 0 0 # / was on /dev/sda7 during installation UUID=e63fa8a2-432f-4749-b9db-dab328807d04 / ext4 errors=remount-ro 0 1 # /boot was on /dev/sda4 during installation UUID=e9ad1bb4-7c1f-4ea9-a6a5-799dfad71c0a /boot ext4 defaults 0 2 # /home was on /dev/sda8 during installation UUID=eda8c755-5448-4de8-b58c-9cb75823c22d /home ext4 defaults 0 2 # swap was on /dev/sda9 during installation UUID=804ff3a7-e5dd-406a-b63c-e8f3c635fbc5 none swap sw 0 0 #Windows-Partition UUID=368CEBC57807FDCD /media/Share ntfs defaults,uid=1000,gid=1000,noexec 0 0 As you can see I have added the noexec bit to the configuration. Why? Because any file I create on or move to the partition is automatically marked as executable. The problem is that there is no way of changing that through nautilus. I cannot uncheck the "Allow executing file as program" option. The noexec option doesn't help, unfortunately. It only prevents nautilus from displaying the "run" or "read" dialog but doesn't change the executable flag. Is there any way I can fix this?

    Read the article

  • Lubuntu 12.04 is a non-LTS release - does this mean that LXDE isn't, either?

    - by MHC
    Lubuntu 12.04 is not a long-term-support release. That's mostly due to a lack of manpower. But I don't use Lubuntu on my machine, I use LXDE over stock Ubuntu 12.04 LTS. So my question is: In the next five years, will there be security updates and bug fixes for LXDE-packages such as Openbox, PCmanFM and LXsession? Or does the "LTS" in 12.04 LTS only include stock Unity packages? I guess this question is just as relevant for any other DE out there.

    Read the article

1