Posts: 107
brian
Joined: 10 Sep 2011
#1
Hi everyone,
I installed an app from Synaptic called webp in order to compress photos for web usage. The install went fine, but I can't find it! __{{emoticon}}__ How do I go about finding it? It didn't even install into the menu..

Any help much appreciated.
brian

PS. Lovin' AntiX on my Compaq Presario 2700 with only 256MB of RAM and going strong!! __{{emoticon}}__
Last edited by brian on 04 Jan 2012, 10:00, edited 1 time in total.
Posts: 11
fratermus
Joined: 15 Dec 2011
#2

Code: Select all

which webp
to find foo in your path. This will suffice for"want to find it to run it" purposes.

Code: Select all

locate webp
will find instances of files called foo, whether or not they are an executable.

There are other tools but these suffice for many/most scenarios like this and I am desperately sick at the moment and must go to bed. Flu, I t
hink.

{editing because I just saw the name of the prog in your post. I installed it and the two utils above found nothing. No man page either but

Code: Select all

apropos webp
revealed
cwebp (1) - compress an image file to a WebP file
dwebp (1) - decompress a WebP file to an image file


This is weirder than most package installs, so don't let it throw you.

Code: Select all

which cwebp
/usr/bin/cwebp
That's what which is supposed to do. }
Posts: 107
brian
Joined: 10 Sep 2011
#3
fratermus wrote:

Code: Select all

which webp
to find foo in your path. This will suffice for"want to find it to run it" purposes.

Code: Select all

locate webp
will find instances of files called foo, whether or not they are an executable.

There are other tools but these suffice for many/most scenarios like this and I am desperately sick at the moment and must go to bed. Flu, I t
hink.

{editing because I just saw the name of the prog in your post. I installed it and the two utils above found nothing. No man page either but

Code: Select all

apropos webp
revealed
cwebp (1) - compress an image file to a WebP file
dwebp (1) - decompress a WebP file to an image file


This is weirder than most package installs, so don't let it throw you.

Code: Select all

which cwebp
/usr/bin/cwebp
That's what which is supposed to do. }
Hi fratermus,
sorry to hear about the flu.. it's certainly that time of year again, and it's no fun, I know.. Rest up!

I had the same non-responses using"which" and"locate."

I tried to run cwebp with the run button on the menu, but it didn't open anything. It's truly a mystery app!

I tried to find the app using the command

Code: Select all

ls *webp*
but nothing showed up.

So I tried opening the file going into /user/bin directly, but it doesn't open; so my thinking is that it's an app that gets imbedded in a file manager or something.

So I know it's there, but not able to use it yet..

brian
Posts: 4,164
rokytnji
Joined: 20 Feb 2009
#4
To make sure webp installed correctly first. Try

Code: Select all

$ apt-cache policy webp 
webp:
  Installed: (none)
  Candidate: 0.1.2-1
  Version table:
     0.1.2-1 0
        500 http://ftp.us.debian.org/debian/ testing/main i386 Packages
As you can see. I don't have it installed.
Posts: 107
brian
Joined: 10 Sep 2011
#5
rokytnji wrote:To make sure webp installed correctly first. Try

Code: Select all

$ apt-cache policy webp 
webp:
  Installed: (none)
  Candidate: 0.1.2-1
  Version table:
     0.1.2-1 0
        500 http://ftp.us.debian.org/debian/ testing/main i386 Packages
As you can see. I don't have it installed.
Hi roky,
here's what I get using the command you suggested:

Code: Select all

brian@antiX1:~$ apt-cache policy webp
webp:
  Installed: 0.1.3-2
  Candidate: 0.1.3-2
  Version table:
 *** 0.1.3-2 0
        500 http://ftp.us.debian.org/debian/ testing/main i386 Packages
        100 /var/lib/dpkg/status
brian
Posts: 279
afab4
Joined: 17 Oct 2009
#6
To run WebP from the command line use

Code: Select all

jim@E4300:~$ cwebp
Usage:

   cwebp [options] -q quality input.png -o output.webp

where quality is between 0 (poor) to 100 (very good).
Typical value is around 80.

Try -longhelp for an exhaustive list of advanced options.
jim@E4300:~$ 
or

Code: Select all

.
jim@E4300:~$ dwebp
missing input file!!
Usage: dwebp in_file [options] [-o out_file]

Decodes the WebP image file to PNG format [Default]
Use following options to convert into alternate image formats:
  -ppm ......... save the raw RGB samples as color PPM
  -pgm ......... save the raw YUV samples as a grayscale PGM
                 file with IMC4 layout.
 Other options are:
  -version  .... print version number and exit.
  -nofancy ..... don't use the fancy YUV420 upscaler.
  -nofilter .... disable in-loop filtering.
  -mt .......... use multi-threading
  -crop <x> <y> <w> <h> ... crop output with the given rectangle
  -scale <w> <h> .......... scale the output (*after* any cropping)
  -h     ....... this help message.
  -v     ....... verbose (e.g. print encoding/decoding times)
  -noasm ....... disable all assembly optimizations.
jim@E4300:~$                
Check out this link


========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://code.google.com/speed/webp/"
linktext was:"http://code.google.com/speed/webp/"
====================================
Posts: 11
fratermus
Joined: 15 Dec 2011
#7
brian wrote: I tried to run cwebp with the run button on the menu, but it didn't open anything. It's truly a mystery app!
the command line is your friend when running mystery apps; it will show you error/help dialogs that terminal-less menu entries will not.

As roky demonstrated by running both, they require command line arguments passed to them before they do anything useful.

I just ran a test and it seems to work as advertised, though I don't know what actually can read the resulting .webp files:

mouse@moon2:~/usb/safe/graphics$ cwebp -preset photo IMGP2276.jpg -o IMGP2276.webp

Code: Select all

Saving file 'IMGP2276.webp'
  98248 bytes Y-U-V-All-PSNR 39.51 45.01 45.80   40.75 dB
block count:  intra4: 6348
              intra16: 1152  (-> 15.36%)
              skipped block: 38 (0.51%)
bytes used:  header:            233  (0.2%)
             mode-partition:  31859  (32.4%)
 Residuals bytes  |segment 1|segment 2|segment 3|segment 4|  total
  intra4-coeffs:  |    7202 |   10402 |   21665 |   11753 |   51022  (51.9%)
 intra16-coeffs:  |     211 |     476 |    5255 |    2340 |    8282  (8.4%)
  chroma coeffs:  |     608 |    1017 |    3818 |    1382 |    6825  (6.9%)
    macroblocks:  |       8%|      15%|      55%|      21%|    7500
      quantizer:  |      41 |      36 |      23 |      15 |
   filter level:  |       9 |       6 |       3 |       0 |
------------------+---------+---------+---------+---------+-----------------
 segments total:  |    8021 |   11895 |   30738 |   15475 |   66129  (67.3%)
mouse@moon2:~/usb/safe/graphics$ ls -l IMGP2276*

Code: Select all

-rwxr-xr-x 1 mouse mouse 1480667 Oct 20 07:25 IMGP2276.jpg
-rwxrw-rw- 1 mouse mouse   98248 Jan  2 23:36 IMGP2276.webp

BTW, took the night off from work and will get more sleep.

{edited to alter formatting -- no bold in code sections}
Posts: 11
fratermus
Joined: 15 Dec 2011
#8
Ahh, according to
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://code.google.com/speed/webp/"
linktext was:"the project page"
====================================
Chrome can view them natively. Tested it and it worked.
Posts: 162
drg
Joined: 22 Feb 2010
#9
tip: looked to packages.debian.org for webp, at bottom there's the"download webp" section and the right is"list of files". click it and you get the filelist.
/usr/bin/cwebp
/usr/bin/dwebp
/usr/share/doc/webp/changelog.Debian.gz
/usr/share/doc/webp/changelog.gz
/usr/share/doc/webp/copyright
/usr/share/man/man1/cwebp.1.gz
/usr/share/man/man1/dwebp.1.gz

Also can be viewed from mc if you've got the .deb file on hand.
Edit: sorry, should have mentioned: Navigate to the (uninstalled) .deb file, press F3 to view the readables in it, and F3 again to stop viewing in mc.
Posts: 107
brian
Joined: 10 Sep 2011
#10
fratermus wrote:
brian wrote: I tried to run cwebp with the run button on the menu, but it didn't open anything. It's truly a mystery app!
the command line is your friend when running mystery apps; it will show you error/help dialogs that terminal-less menu entries will not.

As roky demonstrated by running both, they require command line arguments passed to them before they do anything useful.

I just ran a test and it seems to work as advertised, though I don't know what actually can read the resulting .webp files:

mouse@moon2:~/usb/safe/graphics$ cwebp -preset photo IMGP2276.jpg -o IMGP2276.webp

Code: Select all

Saving file 'IMGP2276.webp'
  98248 bytes Y-U-V-All-PSNR 39.51 45.01 45.80   40.75 dB
block count:  intra4: 6348
              intra16: 1152  (-> 15.36%)
              skipped block: 38 (0.51%)
bytes used:  header:            233  (0.2%)
             mode-partition:  31859  (32.4%)
 Residuals bytes  |segment 1|segment 2|segment 3|segment 4|  total
  intra4-coeffs:  |    7202 |   10402 |   21665 |   11753 |   51022  (51.9%)
 intra16-coeffs:  |     211 |     476 |    5255 |    2340 |    8282  (8.4%)
  chroma coeffs:  |     608 |    1017 |    3818 |    1382 |    6825  (6.9%)
    macroblocks:  |       8%|      15%|      55%|      21%|    7500
      quantizer:  |      41 |      36 |      23 |      15 |
   filter level:  |       9 |       6 |       3 |       0 |
------------------+---------+---------+---------+---------+-----------------
 segments total:  |    8021 |   11895 |   30738 |   15475 |   66129  (67.3%)
mouse@moon2:~/usb/safe/graphics$ ls -l IMGP2276*

Code: Select all

-rwxr-xr-x 1 mouse mouse 1480667 Oct 20 07:25 IMGP2276.jpg
-rwxrw-rw- 1 mouse mouse   98248 Jan  2 23:36 IMGP2276.webp

BTW, took the night off from work and will get more sleep.

{edited to alter formatting -- no bold in code sections}
Thanks for all your tribulations in spite of your flu bug, fratermus!
From your post, it seems that it requires the command line to work. (Correct me if I'm wrong.) I'm not so good at using the command line yet to have been able to make it run correctly like you did.
Working files from the command line is fine, except in the case of compressing jpg files it's much better to have a GUI. And, as you pointed out, this app makes webp files, which I can't use if I'm not 100% sure that all browsers can display them correctly.
So I'll probably not use this app in the end.

That's why for now, I'm happy using a small add-on to the KDE Dolphin FM, called"kim." I found it on the kde-apps website, and it batch processes photos in lots of ways. It's just great for my work, where I need to take pics of several megs and reduce them to less than 200kb without losing size or quality.
If I knew of similar apps for other file managers (like rox) I'd be elated.

So for now, I have to use Dolphin, which is a bit"heavier" on resources, but it does the job. On my Compaq Presario (with 256kb of RAM) it's a bit difficult. So I process the photos on my other PCs.

Thanks to you and others who've posted here. __{{emoticon}}__ __{{emoticon}}__

Brian
Posts: 107
brian
Joined: 10 Sep 2011
#11
marking as solved

brian