MCDE: PNG, JPEG and GIF in dtphoto, one picture writer in libDtSvc
dtphoto read only BMP and ICO and wrote only BMP; PNG, JPEG and GIF were listed as open in docs/MCDE-PROGRAMS.md since 2026-11-12. The reader was already there: McdeThumbRead in libDtSvc has all five formats, is X-free and is what dtfile uses for its miniatures. dtphoto calls it for everything its own reader does not know, so the program carries no second decoder. There was no picture writer anywhere in the tree, so McdeThumbWrite now sits next to the reader: PNG through libpng's simplified API, BMP in C99, the ending decides, an unknown ending is refused instead of silently becoming a BMP. Measured on Xvfb depth 24 (2026-11-22): - 40x30 PNG -> PNG, 1200 of 1200 pixels identical, CRC checked. - 40x30 GIF -> PNG, 0 of 1200 pixels different. - 40x30 JPEG q100 -> PNG, at most 3 steps per channel (compression, not the reader); the same picture written from libpng is 0 steps. - Depth 8: a 32-colour picture comes back 0 of 256 pixels different; a 1200-colour ramp differs by mean 28.6/255, which is the colormap -- the same ramp is 0 on depth 24. test_thumb writes a 13x7 ramp (every pixel unique) as PNG and BMP and reads it back pixel for pixel. Proved the test bites: writing the BMP rows top-down turns it red at 78 of 91 pixels, PNG_FORMAT_BGR at 91 of 91. The unknown-ending and zero-size cases are checked too. dtphoto: the file dialog filters on every format it reads, not on *.bmp. All 18 dtphoto test modes stay green on depth 24 and depth 8, test_thumb ok.
This commit is contained in:
1 parent
d234b8be2e
commit
d6479ef90f
8 files changed
+1827
-41
No files matched your search
+53
-2
@@ -472,8 +472,59 @@ den der Callback schaltet) und `-optest` gegen die Arithmetik, nicht gegen
|
||||
weichgezeichnet, dieselbe Kante zu 255 bzw. 0 geschaerft, eine
|
||||
Mosaic-Zelle zu ihrem Mittelwert. Alle acht Tests gruen auf Tiefe 24 und
|
||||
Tiefe 8, `-selftest` byte-identisch (2.359.350 Bytes, 0 Abweichungen).
|
||||
Offen: Verlauf, Optionsleiste, PNG/TIFF/PSD, Distort/Noise-Render,
|
||||
Effekte-Ebene, P3-P6.
|
||||
Offen: PNG/TIFF/PSD, Distort/Noise-Render, Effekte-Ebene, P3-P6.
|
||||
|
||||
Stand 2026-11-22 (Auswahl-Morphologie und Optionsleiste): Select > Modify
|
||||
(Border, Smooth, Expand, Contract), Grow, Similar und Feather rechnen auf
|
||||
einem exakten euklidischen Abstandsfeld (zwei Durchlaeufe, dann Abstand zum
|
||||
naechsten gesetzten und zum naechsten freien Pixel) -- kein Schaetzwert.
|
||||
Feather brauchte eine zweite Ebene: ein Bit je Pixel kann keine weiche
|
||||
Kante tragen, deshalb liegt neben der Bitmaske eine Deckung 0-255 in
|
||||
`selCover`, und jeder Verbraucher (`OpPerPixel`, Verlauf, `PaintMask`)
|
||||
mischt damit statt an der Bitkante zu schneiden. `Window > Show Options`
|
||||
oeffnet die Optionsbox: Bleistift- und Radiererradius, Toleranz des
|
||||
Zauberstabs (die Grow/Similar mitlesen), Retusche-Radius und -Staerke,
|
||||
Verlauf linear/radial. Jedes Feld schreibt direkt in die Variable, die der
|
||||
Ereignispfad liest, und meldet `dtphoto: options <name>=<wert>` auf stderr.
|
||||
Die Zeilen sind ueber die *Felder* verkettet, nicht ueber ihre Labels: ein
|
||||
Textfeld ist hoeher als sein Label, sonst stapelten sich die Felder
|
||||
uebereinander und das Toleranzfeld war nicht erreichbar (gemessen
|
||||
2026-11-22, der Klick landete im Radiererfeld). Malen ist wie im Original
|
||||
auf die Auswahl beschnitten: Bleistift (harte Spitze 2r+1), Pinsel (runde
|
||||
Spitze) und Radierer laufen ueber `PaintTip`, das den Kasten um den Tupfer
|
||||
einmal liest, mit der Deckung mischt und zurueckschreibt; vorher malte der
|
||||
Bleistift ueber die Maske hinweg und ignorierte seinen Radius ganz (ein
|
||||
XDrawPoint).
|
||||
Belegt ohne Display: `-selmodtest` (5x5-Block um 1 kontrahiert verliert
|
||||
genau die vier Ecken, 2-px-Band aus Border, Grow nimmt die Nachbarfarbe,
|
||||
Similar das ganze Bild) und `-optest` (Spitze ueber der Auswahlkante
|
||||
aendert nur die zwei gewaehlten Spalten; Zauberstab bei Toleranz 0 ein
|
||||
Pixel, bei 100 sechs). Per Maus belegt: Optionsbox offen (240x207),
|
||||
Toleranz 32 -> 100, Bleistiftradius 3 -> 12 zeichnet 7 bzw. 25 Pixel breit.
|
||||
Alle 18 Tests gruen auf Tiefe 24 und Tiefe 8.
|
||||
|
||||
Stand 2026-11-22 (Formate): Gelesen wurde bisher nur BMP und ICO, geschrieben
|
||||
nur BMP -- PNG, JPEG und GIF standen seit dem 12.11. als offen in dieser
|
||||
Datei. Der Leser war schon da: `McdeThumbRead` in libDtSvc kann alle fuenf
|
||||
(PNG, JPEG, GIF, BMP, XPM), ist X-frei und wird von dtfile fuer Miniaturen
|
||||
benutzt. `dtphoto` ruft ihn jetzt fuer alles auf, was sein eigener Leser
|
||||
nicht kennt -- kein zweiter Decoder im Programm. Geschrieben wird ueber
|
||||
`McdeThumbWrite`, das in dieser Runde neben dem Leser entstanden ist (es gab
|
||||
im ganzen Baum keinen Bildschreiber): PNG ueber die simplified API von
|
||||
libpng, BMP in C99, die Endung entscheidet, eine unbekannte Endung wird
|
||||
abgelehnt statt still als BMP geschrieben. Der Dateidialog filtert auf alle
|
||||
gelesenen Endungen, nicht mehr auf `*.bmp`.
|
||||
Gemessen auf Xvfb Tiefe 24: ein 40x30-PNG kommt als PNG mit 1200 von 1200
|
||||
Pixeln identisch zurueck (CRC geprueft), ein 40x30-GIF mit 0 von 1200
|
||||
abweichenden Pixeln, JPEG q100 mit hoechstens 3 Kanalschritten (erwartbar
|
||||
verlustbehaftet). Auf Tiefe 8 ist ein 32-Farben-Bild exakt (0 von 256
|
||||
Pixeln), ein 1200-Farben-Verlauf weicht um mittlere 28,6/255 ab -- das ist
|
||||
die Colormap, nicht der Leser, und derselbe Verlauf weicht auf Tiefe 24 um 0
|
||||
ab. `test_thumb` schreibt einen 13x7-Farbverlauf als PNG und BMP, liest ihn
|
||||
zurueck und vergleicht jedes Pixel; umgedrehte Zeilen im BMP-Schreiber und
|
||||
vertauschte Kanaele im PNG-Schreiber machen den Test rot (beides geprueft).
|
||||
Alle 18 dtphoto-Tests weiterhin gruen auf beiden Tiefen.
|
||||
Offen bleiben TIFF und PSD (eigene Decoder noetig) sowie JPEG-Schreiben.
|
||||
|
||||
### C2. dtillustrator -- Illustrator 5.5.1, exakter Nachbau
|
||||
|
||||
|
||||
+45
-2
@@ -132,6 +132,36 @@ narratives and test notes, is `docs/reference/mcde-agents-history-2026-11-13.txt
|
||||
The zoom magnifier doubles on the left button and halves on the right
|
||||
(12%-800%), the hand pans the view, and both say what they did on
|
||||
stderr so a mouse-driven test can read the result.
|
||||
The Select menu's morphology works on an exact euclidean distance field
|
||||
(two passes, then the distance to the nearest selected and the nearest
|
||||
unselected pixel), so Expand, Contract, Border, Smooth, Grow, Similar
|
||||
and Feather are arithmetic, not guesses. Feather needed a second
|
||||
layer: one bit per pixel cannot carry a soft edge, so `selCover` holds
|
||||
0-255 beside the bit mask and every consumer -- `OpPerPixel`, the
|
||||
gradient, `PaintMask` -- mixes by that coverage instead of cutting at
|
||||
the bit. `-selmodtest` checks the numbers (a 5x5 block contracted by 1
|
||||
loses its four corners and nothing else, a 2 px band from Border, Grow
|
||||
taking the neighbouring colour and Similar the whole picture).
|
||||
`Window > Show Options` opens the Options box, which is where the
|
||||
tool parameters live: pencil and eraser radius, the wand's tolerance
|
||||
(which Grow/Similar read too), the retouch radius and strength, and the
|
||||
gradient as linear or radial. Every field writes straight into the
|
||||
variable the event handler reads, so there is no second copy, and each
|
||||
edit says `dtphoto: options <name>=<value>` on stderr. The box is built
|
||||
by a fixed row list, and a row returns the FIELD, not its label: a text
|
||||
field is taller than its label, so attaching the next row to the label
|
||||
stacked the fields on top of each other and the tolerance field was
|
||||
unreachable (measured 2026-11-22, the click landed in the eraser field).
|
||||
`DTPHOTO_OPTIONS=1` opens the box at startup, which is how the test
|
||||
reaches it without a mouse.
|
||||
Painting is clipped to the selection, as in the original: the pencil
|
||||
(a hard square tip of 2r+1), the brush (a round one) and the eraser all
|
||||
go through `PaintTip`, which reads the box around the dab once, mixes by
|
||||
the coverage and writes it back. Before that the pencil drew its tip
|
||||
over the whole picture whatever the mask said, and the pencil ignored
|
||||
its radius entirely (one XDrawPoint). `-optest` proves both: a tip laid
|
||||
across the edge of a 2 px selection changes only those two columns, and
|
||||
the wand at tolerance 0 takes one pixel where tolerance 100 takes six.
|
||||
dtpaint builds its menus in code and its labels are catalogued
|
||||
(`dtpaint.msg`, 51 messages from 1-53, 52 unused: menus, the
|
||||
tool/file/error/discard/attributes/colour/print dialogs, Help and About);
|
||||
@@ -158,7 +188,17 @@ narratives and test notes, is `docs/reference/mcde-agents-history-2026-11-13.txt
|
||||
undo across it); Edit Colors sets the foreground from three RGB scales;
|
||||
BMP 8-bit (uncompressed and RLE8) and the first image of an ICO
|
||||
(1/4/8/24/32 bpp, alpha 0 composited on the background; PNG-compressed
|
||||
icons refused) are read, saving stays 24-bit BMP; Print spools the
|
||||
icons refused) go through the program's own reader; PNG, JPEG, GIF and
|
||||
XPM come from `McdeThumbRead` (libDtSvc), so the program carries no
|
||||
second decoder. Saving writes the format the name ends in, `.png` and
|
||||
`.bmp` through `McdeThumbWrite`, anything else as 24-bit BMP. Measured
|
||||
2026-11-22 on Xvfb depth 24: a 40x30 PNG written back is 1200 of 1200
|
||||
pixels identical, a GIF 0 of 1200 different, JPEG q100 at most 3 steps
|
||||
per channel; on depth 8 a 32-colour picture comes back exact and the
|
||||
1200-colour ramp is off by the colormap (mean 28.6 of 255), which is the
|
||||
visual, not the reader. `test_thumb` writes a 13x7 ramp and reads it
|
||||
back pixel for pixel, and turns red when the writer's rows are flipped or
|
||||
its channels swapped. Print spools the
|
||||
current image through `mcde_sys_print_file` (lp; MCDE_PRINT_COMMAND fakes
|
||||
the tool in tests) and removes the temporary file when the job ends.
|
||||
McdeSys has a catalog too (`lib/McdeSys/mcdesys.msg`, `lib/McdeSys/
|
||||
@@ -192,7 +232,10 @@ narratives and test notes, is `docs/reference/mcde-agents-history-2026-11-13.txt
|
||||
test `test_thumb`) is the miniature: PNG, JPEG, GIF, BMP and XPM read with
|
||||
libpng, libjpeg and C99, scaled with a box filter and cached in
|
||||
`~/.dt/thumbs/<64|128|256>/` -- the one picture reader for dtfile and the
|
||||
programs that show pictures, no gdk-pixbuf, no program per picture.
|
||||
programs that show pictures, no gdk-pixbuf, no program per picture. Since
|
||||
2026-11-22 it writes too: `McdeThumbWrite` (PNG through libpng's simplified
|
||||
API, BMP in C99, the ending decides), so an editor saves without a second
|
||||
encoder.
|
||||
- Programs of its own: `dtbar` (top bar and global menu, protocol
|
||||
`include/Mcde/GlobalMenu.h`), `dtkeys`, `dtthemesync`, `dtappscan`,
|
||||
`dtsystemsettings` (panes by category, McdeSys only), `dtdiskutility`,
|
||||
|
||||
@@ -51,6 +51,14 @@ void McdeThumbFree(McdeThumbImage *image);
|
||||
int McdeThumbScale(const unsigned char *src, int sw, int sh, int maxw,
|
||||
int maxh, unsigned char **dst, int *w, int *h);
|
||||
|
||||
/* IMAGE (8-bit RGB) written to PATH. The format comes from the name's
|
||||
* ending: .png and .bmp are written, anything else is refused. A picture
|
||||
* written here is read back by McdeThumbRead() pixel for pixel, which is
|
||||
* what the test checks. 0 on success, -1 on a bad argument, an unknown
|
||||
* ending or a write error. */
|
||||
int McdeThumbWrite(const char *path, const unsigned char *rgb, int w,
|
||||
int h);
|
||||
|
||||
/* IMAGE on SCREEN as a pixmap of the screen's depth; the size is the
|
||||
* picture's, in pixels. 0 on success, -1 when the picture cannot be read or
|
||||
* the visual is not one this module writes (PseudoColor is not). */
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
@@ -908,6 +909,15 @@ bad:
|
||||
/* ------------------------------------------------------------------ */
|
||||
/* BMP: BI_RGB, 8 and 24 and 32 bits */
|
||||
|
||||
static void
|
||||
Le32Put(unsigned char *p, unsigned long v)
|
||||
{
|
||||
p[0] = (unsigned char) (v & 0xff);
|
||||
p[1] = (unsigned char) ((v >> 8) & 0xff);
|
||||
p[2] = (unsigned char) ((v >> 16) & 0xff);
|
||||
p[3] = (unsigned char) ((v >> 24) & 0xff);
|
||||
}
|
||||
|
||||
static unsigned long
|
||||
Le32(const unsigned char *p)
|
||||
{
|
||||
@@ -1551,3 +1561,114 @@ McdeThumbScale(const unsigned char *src, int sw, int sh, int maxw, int maxh,
|
||||
return -1;
|
||||
return ScaleTo(src, sw, sh, maxw, maxh, dst, w, h);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
/* writing a picture, the reverse of the readers above */
|
||||
|
||||
/* the ending of PATH, lower case, without the dot; NULL when there is none */
|
||||
static const char *
|
||||
Ending(const char *path)
|
||||
{
|
||||
const char *dot = strrchr(path, '.');
|
||||
|
||||
if (dot == NULL || dot[1] == '\0')
|
||||
return NULL;
|
||||
return dot + 1;
|
||||
}
|
||||
|
||||
static int
|
||||
SameEnding(const char *path, const char *want)
|
||||
{
|
||||
const char *e = Ending(path);
|
||||
size_t i;
|
||||
|
||||
if (e == NULL)
|
||||
return 0;
|
||||
for (i = 0; want[i] != '\0'; i++)
|
||||
if (tolower((unsigned char) e[i]) != want[i])
|
||||
return 0;
|
||||
return e[i] == '\0';
|
||||
}
|
||||
|
||||
static int
|
||||
WritePng(const char *path, const unsigned char *rgb, int w, int h)
|
||||
{
|
||||
png_image img;
|
||||
|
||||
memset(&img, 0, sizeof img);
|
||||
img.version = PNG_IMAGE_VERSION;
|
||||
img.width = (png_uint_32) w;
|
||||
img.height = (png_uint_32) h;
|
||||
img.format = PNG_FORMAT_RGB;
|
||||
if (!png_image_write_to_file(&img, path, 0, rgb, 0, NULL)) {
|
||||
png_image_free(&img);
|
||||
return -1;
|
||||
}
|
||||
png_image_free(&img);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
WriteBmp(const char *path, const unsigned char *rgb, int w, int h)
|
||||
{
|
||||
FILE *fp;
|
||||
unsigned char hdr[54], *line;
|
||||
long row = ((long) w * 3 + 3) & ~3L;
|
||||
long size = row * (long) h;
|
||||
int x, y;
|
||||
|
||||
if ((fp = fopen(path, "wb")) == NULL)
|
||||
return -1;
|
||||
memset(hdr, 0, sizeof hdr);
|
||||
hdr[0] = 'B';
|
||||
hdr[1] = 'M';
|
||||
Le32Put(hdr + 2, 54L + size);
|
||||
Le32Put(hdr + 10, 54);
|
||||
Le32Put(hdr + 14, 40);
|
||||
Le32Put(hdr + 18, (unsigned long) w);
|
||||
Le32Put(hdr + 22, (unsigned long) h);
|
||||
hdr[26] = 1; /* planes */
|
||||
hdr[28] = 24; /* bits per pixel */
|
||||
Le32Put(hdr + 34, (unsigned long) size);
|
||||
Le32Put(hdr + 38, 2835); /* 72 dpi, as the original writes it */
|
||||
Le32Put(hdr + 42, 2835);
|
||||
if (fwrite(hdr, 1, sizeof hdr, fp) != sizeof hdr) {
|
||||
fclose(fp);
|
||||
return -1;
|
||||
}
|
||||
if ((line = malloc((size_t) row)) == NULL) {
|
||||
fclose(fp);
|
||||
return -1;
|
||||
}
|
||||
for (y = h - 1; y >= 0; y--) {
|
||||
const unsigned char *s = rgb + (size_t) y * (size_t) w * 3;
|
||||
|
||||
memset(line, 0, (size_t) row);
|
||||
for (x = 0; x < w; x++) {
|
||||
line[x * 3] = s[x * 3 + 2]; /* BMP is BGR */
|
||||
line[x * 3 + 1] = s[x * 3 + 1];
|
||||
line[x * 3 + 2] = s[x * 3];
|
||||
}
|
||||
if (fwrite(line, 1, (size_t) row, fp) != (size_t) row) {
|
||||
free(line);
|
||||
fclose(fp);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
free(line);
|
||||
return fclose(fp) == 0 ? 0 : -1;
|
||||
}
|
||||
|
||||
int
|
||||
McdeThumbWrite(const char *path, const unsigned char *rgb, int w, int h)
|
||||
{
|
||||
if (path == NULL || rgb == NULL || w <= 0 || h <= 0 ||
|
||||
w > MAX_WIDTH || h > MAX_HEIGHT ||
|
||||
(long) w * (long) h > MAX_PIXELS)
|
||||
return -1;
|
||||
if (SameEnding(path, "png"))
|
||||
return WritePng(path, rgb, w, h);
|
||||
if (SameEnding(path, "bmp"))
|
||||
return WriteBmp(path, rgb, w, h);
|
||||
return -1;
|
||||
}
|
||||
@@ -308,6 +308,104 @@ TestFormats(const char *dir)
|
||||
McdeThumbFree(&image);
|
||||
}
|
||||
|
||||
/*
|
||||
* A picture in which every pixel is unique: red = x * 8 + 8, green = y * 8 +
|
||||
* 8, blue = 128. A writer that flips the rows, swaps the channels or drops
|
||||
* the alpha cannot pass this.
|
||||
*/
|
||||
static void
|
||||
Ramp(unsigned char *rgb, int w, int h)
|
||||
{
|
||||
int x, y;
|
||||
|
||||
for (y = 0; y < h; y++)
|
||||
for (x = 0; x < w; x++) {
|
||||
unsigned char *p = rgb + ((size_t) y * w + x) * 3;
|
||||
|
||||
p[0] = (unsigned char) (x * 8 + 8);
|
||||
p[1] = (unsigned char) (y * 8 + 8);
|
||||
p[2] = 128;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* The writer: PNG and BMP are written from one RGB buffer and read back with
|
||||
* the reader above. Every pixel has to come back unchanged, and an ending
|
||||
* the writer does not know has to be refused -- not written as something else.
|
||||
*/
|
||||
static void
|
||||
TestWrite(const char *dir)
|
||||
{
|
||||
unsigned char rgb[13 * 7 * 3];
|
||||
char path[PATH_MAX];
|
||||
McdeThumbImage image;
|
||||
int x, y, bad;
|
||||
|
||||
Ramp(rgb, 13, 7);
|
||||
|
||||
snprintf(path, sizeof path, "%s/write.png", dir);
|
||||
CHECK(McdeThumbWrite(path, rgb, 13, 7) == 0);
|
||||
memset(&image, 0, sizeof image);
|
||||
CHECK(McdeThumbRead(path, 0, 0, &image) == 0);
|
||||
CHECK(image.width == 13 && image.height == 7);
|
||||
if (image.width == 13 && image.height == 7) {
|
||||
for (bad = 0, y = 0; y < 7; y++)
|
||||
for (x = 0; x < 13; x++) {
|
||||
const unsigned char *p = image.rgb +
|
||||
((size_t) y * 13 + x) * 3;
|
||||
const unsigned char *q = rgb +
|
||||
((size_t) y * 13 + x) * 3;
|
||||
|
||||
if (p[0] != q[0] || p[1] != q[1] ||
|
||||
p[2] != q[2])
|
||||
bad++;
|
||||
}
|
||||
if (bad != 0)
|
||||
fprintf(stderr, "FAIL line %d: png round trip, "
|
||||
"%d of 91 pixels differ\n", __LINE__, bad);
|
||||
CHECK(bad == 0);
|
||||
}
|
||||
McdeThumbFree(&image);
|
||||
|
||||
snprintf(path, sizeof path, "%s/write.bmp", dir);
|
||||
CHECK(McdeThumbWrite(path, rgb, 13, 7) == 0);
|
||||
memset(&image, 0, sizeof image);
|
||||
CHECK(McdeThumbRead(path, 0, 0, &image) == 0);
|
||||
CHECK(image.width == 13 && image.height == 7);
|
||||
if (image.width == 13 && image.height == 7) {
|
||||
for (bad = 0, y = 0; y < 7; y++)
|
||||
for (x = 0; x < 13; x++) {
|
||||
const unsigned char *p = image.rgb +
|
||||
((size_t) y * 13 + x) * 3;
|
||||
const unsigned char *q = rgb +
|
||||
((size_t) y * 13 + x) * 3;
|
||||
|
||||
if (p[0] != q[0] || p[1] != q[1] ||
|
||||
p[2] != q[2])
|
||||
bad++;
|
||||
}
|
||||
if (bad != 0)
|
||||
fprintf(stderr, "FAIL line %d: bmp round trip, "
|
||||
"%d of 91 pixels differ\n", __LINE__, bad);
|
||||
CHECK(bad == 0);
|
||||
}
|
||||
McdeThumbFree(&image);
|
||||
|
||||
/* the ending decides, in either case; an unknown one is refused */
|
||||
snprintf(path, sizeof path, "%s/write.PNG", dir);
|
||||
CHECK(McdeThumbWrite(path, rgb, 13, 7) == 0);
|
||||
CHECK(McdeThumbRead(path, 0, 0, &image) == 0);
|
||||
McdeThumbFree(&image);
|
||||
snprintf(path, sizeof path, "%s/write.tiff", dir);
|
||||
CHECK(McdeThumbWrite(path, rgb, 13, 7) != 0);
|
||||
snprintf(path, sizeof path, "%s/noending", dir);
|
||||
CHECK(McdeThumbWrite(path, rgb, 13, 7) != 0);
|
||||
/* and a picture of nothing is not written at all */
|
||||
snprintf(path, sizeof path, "%s/write2.png", dir);
|
||||
CHECK(McdeThumbWrite(path, rgb, 0, 7) != 0);
|
||||
CHECK(access(path, F_OK) != 0);
|
||||
}
|
||||
|
||||
static void
|
||||
TestScale(void)
|
||||
{
|
||||
@@ -454,6 +552,7 @@ main(void)
|
||||
return 1;
|
||||
}
|
||||
TestFormats(dir);
|
||||
TestWrite(dir);
|
||||
TestScale();
|
||||
TestLimits(dir);
|
||||
TestCache(dir);
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -7,3 +7,4 @@ $set 1
|
||||
3 Doc: %dK/%dK
|
||||
4 The picture could not be opened.
|
||||
5 The picture could not be saved.
|
||||
6 Tool Options
|
||||
@@ -7,3 +7,4 @@ $set 1
|
||||
3 Dok: %dK/%dK
|
||||
4 Das Bild konnte nicht geöffnet werden.
|
||||
5 Das Bild konnte nicht gespeichert werden.
|
||||
6 Werkzeugoptionen
|
||||
Reference in new issue
Block a user