Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #235469
| From | Dan Hitt <dan.hitt@gmail.com> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: xv |
| Date | 2021-05-23 19:30 +0200 |
| Message-ID | <Ci05k-6FW-3@gated-at.bofh.it> (permalink) |
| References | <ChL6h-6a8-1@gated-at.bofh.it> <ChUCB-3pi-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On Sun, May 23, 2021 at 4:33 AM Thomas Schmitt <scdbackup@gmx.net> wrote:
> Hi,
>
> Dan Hitt wrote:
> > Thomas, that sounds awesome, please do post somewhere (and provide a link
> > here, if you would be so kind).
>
> So on popular demand by one potential user here it is
>
> http://scdbackup.sourceforge.net/halve_jpeg.c
>
> SHA256SUM:
> b4c9322cd7d20a09a5196ccbcec257bf363d9dea1284333afc9624ff6a05dcc0
>
> It needs installed libjpeg development header files and runtime library.
> To my theory that would be package "libjpeg62-turbo-dev" which brings
> the runtime as dependency.
> The tools for compilation get installed by meta-package "build-essential".
>
> Compile the program by
>
> cc -g -Wall -o halve_jpeg halve_jpeg.c -ljpeg
>
> Test by converting some file
>
> ./halve_jpeg -geometry 1280x1024 large_input_pic.jpg
> ermerging_small_pic.jpg
>
> xv ermerging_small_pic.jpg
>
> The -geometry argument defines a frame into which ermerging_small_pic.jpg
> will fit while retaining its x:y ratio.
>
> For permanent use, copy the file ./halve_jpeg to a directory where the
> shell
> will find it.
>
> It is not very good with enlarging images. My motivation was to condense
> JPEGS with zillions of pixels to screen size without blasting my RAM which
> was only 2 GB at that time.
>
>
> Have a nice day :)
>
> Thomas
>
>
Thanks Thomas for posting it.
On xubuntu 20.2 i was able to compile it after installing some jpeg
packages:
sudo apt-get install jpeginfo libjpeg-dev libjpeg-progs libjpeg-tools
I think some of these names may be generic and point to the turbo code, i'm
not sure. I tried just installing all jpeg packages but got conflicts, so
i pared down the list until i could install.
The code compiled quickly.
It was unwilling to deal with a non-color image that i had ("Unsuitable
JPEG format with 1 components per pixel"), but on color images it works and
is very fast. And since you were so nice to provide the source code, if i
need to deal with non-color images, i can try to modify it.
Thanks again!
dan
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: xv Dan Hitt <dan.hitt@gmail.com> - 2021-05-23 03:30 +0200
Re: xv Dan Hitt <dan.hitt@gmail.com> - 2021-05-23 19:30 +0200
Re: xv "Thomas Schmitt" <scdbackup@gmx.net> - 2021-05-23 22:30 +0200
Re: xv Dan Hitt <dan.hitt@gmail.com> - 2021-05-24 00:40 +0200
Re: xv "Thomas Schmitt" <scdbackup@gmx.net> - 2021-05-23 13:40 +0200
csiph-web