View | Details | Raw Unified
Collapse All | Expand All

(-) converter/other/anytopnm (-9 / +9 lines)
 Lines 73-79    Link Here 
    file --mime /dev/null >/dev/null 2>/dev/null
    file --mime /dev/null >/dev/null 2>/dev/null
    if [ $? -eq 0 ]; then
    if [ $? -eq 0 ]; then
        # Now that we know the --mime option exists, use it.
        # Now that we know the --mime option exists, use it.
        mimeType=`file --mime "$1" | cut -d: -f2-`
        mimeType=`file --mime "$1" | cut -d: -f2- | cut -c2-`
    else
    else
        # file --mime failed; we don't know why, but we assume it's because it
        # file --mime failed; we don't know why, but we assume it's because it
        # is a traditional 'file' program that doesn't have a --mime option.
        # is a traditional 'file' program that doesn't have a --mime option.
 Lines 90-115    Link Here 
    case "$1" in
    case "$1" in
        image/jpeg )
        image/jpeg )
            type = "jfif"
            type="jfif"
            ;;
            ;;
        image/gif )
        image/gif )
            type = "gif"
            type="gif"
            ;;
            ;;
        image/tiff )
        image/tiff )
            type = "tiff"
            type="tiff"
            ;;
            ;;
        image/bmp )
        image/bmp )
            type = "bmp"
            type="bmp"
            ;;
            ;;
        image/png )
        image/png )
            type = "png"
            type="png"
            ;;
            ;;
        image/x-portable-bitmap | image/x-portable-pixmap | \
        image/x-portable-bitmap | image/x-portable-pixmap | \
                image/x-portable-greymap)
                image/x-portable-greymap)
            type = "pnm"
            type="pnm"
            ;;
            ;;
        image/x-xpm )
        image/x-xpm )
            type = "xpm"
            type="xpm"
            ;;
            ;;
        * )
        * )
            filetype=unknown
            filetype=unknown
 Lines 541-547    Link Here 
setMimeType "$file"
setMimeType "$file"
typeDescription=`file "$file" | cut -d: -f2-`
typeDescription=`file "$file" | cut -d: -f2- | cut -c2`
determineType "$file" "$mimeType" "$typeDescription" "$fileExtension"
determineType "$file" "$mimeType" "$typeDescription" "$fileExtension"