fix .gitignore, Makefile and README.md for 2018/bellard

Add Lenna.png from Wikipedia.
This commit is contained in:
Landon Curt Noll committed 2023-03-24 22:06:53 -07:00
1 parent 52576e3d69
commit 2f89f5769b
4 files changed
+35 -23

No files matched your search

+2
View File
@@ -1 +1,3 @@
lena.ppm
prog prog
small.jpg
Binary file not shown.

After

Width:  |  Height:  |  Size: 463 KiB

+9 -4
View File
@@ -62,8 +62,10 @@ X11_INCDIR= /opt/X11/include
# Common C compiler warnings to silence # Common C compiler warnings to silence
# #
CSILENCE= #CSILENCE=
#CSILENCE= -Wno-implicit-int CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-implicit-int \
-Wno-logical-op-parentheses -Wno-main -Wno-parentheses -Wno-pedantic \
-Wno-return-type -Wno-shift-op-parentheses
# Common C compiler warning flags # Common C compiler warning flags
# #
@@ -138,7 +140,9 @@ CC= cc
# #
ifeq ($(CC),clang) ifeq ($(CC),clang)
# #
#CSILENCE+= CSILENCE+= -Wno-conditional-uninitialized -Wno-missing-prototypes \
-Wno-missing-variable-declarations -Wno-poison-system-directories \
-Wno-strict-prototypes
# #
CWARN+= -Weverything CWARN+= -Weverything
# #
@@ -163,7 +167,7 @@ ENTRY= endoh1
PROG= prog PROG= prog
# #
OBJ= ${PROG}.o OBJ= ${PROG}.o
DATA= DATA= fruits.bin lena512.bin vintage_cars.bin Lenna.png
TARGET= ${PROG} TARGET= ${PROG}
# #
ALT_OBJ= ${PROG}.alt.o ALT_OBJ= ${PROG}.alt.o
@@ -215,6 +219,7 @@ clean:
clobber: clean clobber: clean
${RM} -f ${TARGET} ${ALT_TARGET} ${RM} -f ${TARGET} ${ALT_TARGET}
${RM} -f lena.ppm small.jpg
@-if [ -e sandwich ]; then \ @-if [ -e sandwich ]; then \
${RM} -f sandwich; \ ${RM} -f sandwich; \
echo 'ate sandwich'; \ echo 'ate sandwich'; \
+24 -19
View File
@@ -1,25 +1,31 @@
# Most inflationary # Most inflationary
Fabrice Bellard Fabrice Bellard
<https://bellard.org/> <https://bellard.org/>
## To build: # To build:
make all ```sh
make
```
### To run ### To run:
./prog > lena.ppm ```sh
./prog > lena.ppm
```
### Try: ### Try:
eog lena.ppm # On Linux ```sh
preview lena.ppm # On MacOS eog lena.ppm # On Linux
preview lena.ppm # On MacOS
wget http://upload.wikimedia.org/wikipedia/en/2/24/Lenna.png pngtopnm < Lenna.png | pnmscale 0.25 | cjpeg -arithmetic -dct float -quality 14 > small.jpg
pngtopnm < Lenna.png | pnmscale 0.25 | cjpeg -arithmetic -dct float -quality 14 > small.jpg ```
# NOTE: Lenna.png is from https://upload.wikimedia.org/wikipedia/en/7/7d/Lenna_%28test_image%29.png
### Selected Judges Remarks: ## Judges' comments:
The file `small.jpg` will be approximately of the same size as the raw image data The file `small.jpg` will be approximately of the same size as the raw image data
in the program. Compare the level of the detail and the artifacts of in the program. Compare the level of the detail and the artifacts of
@@ -60,9 +66,11 @@ Although the program was optimized to decompress its built-in image,
it accepts to decompress image files from its standard it accepts to decompress image files from its standard
input. Examples: input. Examples:
./prog d < lena512.bin > lena512.ppm ```sh
./prog d < fruits.bin > fruits.ppm ./prog d < lena512.bin > lena512.ppm
./prog d < vintage_cars.bin > vintage_cars.ppm ./prog d < fruits.bin > fruits.ppm
./prog d < vintage_cars.bin > vintage_cars.ppm
```
The original images for [fruits][1] and [vintage cars][2] come from The original images for [fruits][1] and [vintage cars][2] come from
Wikipedia and were resized to a width of 1024 pixels. Warning: the Wikipedia and were resized to a width of 1024 pixels. Warning: the
@@ -73,16 +81,13 @@ The program should be portable on any Unix system. On Windows the line
the main() function to avoid unwanted carriage return characters in the main() function to avoid unwanted carriage return characters in
the output. the output.
--------------------------------------------------------------------------------
[1]: https://commons.wikimedia.org/wiki/File%3AFruits_oranges%2C_jardin_japonais_2.JPG [1]: https://commons.wikimedia.org/wiki/File%3AFruits_oranges%2C_jardin_japonais_2.JPG
[2]: https://commons.wikimedia.org/wiki/File%3ARed_Bull_Jungfrau_Stafette%2C_10th_stage_-_vintage_cars_%282%29.jpg [2]: https://commons.wikimedia.org/wiki/File%3ARed_Bull_Jungfrau_Stafette%2C_10th_stage_-_vintage_cars_%282%29.jpg
-------------------------------------------------------------------------------- ## Copyright:
<!--
(c) Copyright 1984-2018, [Leo Broukhis, Simon Cooper, Landon Curt Noll][judges] - All rights reserved (c) Copyright 1984-2018, [Leo Broukhis, Simon Cooper, Landon Curt Noll][judges] - All rights reserved
This work is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License][cc]. This work is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License][cc].
[judges]: http://www.ioccc.org/judges.html [judges]: http://www.ioccc.org/judges.html
[cc]: http://creativecommons.org/licenses/by-sa/3.0/ [cc]: http://creativecommons.org/licenses/by-sa/3.0/
-->