@ -0,0 +1,47 @@ |
|||
|
|||
[COPY] --- ROCK-COPYRIGHT-NOTE-BEGIN --- |
|||
[COPY] |
|||
[COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|||
[COPY] Please add additional copyright information _after_ the line containing |
|||
[COPY] the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by |
|||
[COPY] the ./scripts/Create-CopyPatch script. Do not edit this copyright text! |
|||
[COPY] |
|||
[COPY] ROCK Linux: rock-src/package/avm/cthumb/cthumb.desc |
|||
[COPY] ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf |
|||
[COPY] |
|||
[COPY] This program is free software; you can redistribute it and/or modify |
|||
[COPY] it under the terms of the GNU General Public License as published by |
|||
[COPY] the Free Software Foundation; either version 2 of the License, or |
|||
[COPY] (at your option) any later version. A copy of the GNU General Public |
|||
[COPY] License can be found at Documentation/COPYING. |
|||
[COPY] |
|||
[COPY] Many people helped and are helping developing ROCK Linux. Please |
|||
[COPY] have a look at http://www.rocklinux.org/ and the Documentation/TEAM |
|||
[COPY] file for details. |
|||
[COPY] |
|||
[COPY] --- ROCK-COPYRIGHT-NOTE-END --- |
|||
|
|||
[I] cthumb allows you to create themable web picture albums |
|||
|
|||
[T] Create themable web picture albums, i.e. collections of digital |
|||
[T] pictures, with small thumbnails of your pictures and with captions. In |
|||
[T] addition, it optionally allows you to have several views of the |
|||
[T] collection of pictures. An album is composed of a series of pages, each |
|||
[T] composed of a collection of pictures. For each page (and each picture), |
|||
[T] you can have several annotations per picture. cthumb will generate |
|||
[T] several versions of the page, for each annotation type. |
|||
|
|||
[U] http://cthumb.sourceforge.net/ project homepage |
|||
|
|||
[A] Carlos Puchol <cpg@users.sourceforge.net> |
|||
[M] Andreas V. 'netrunner' Meier <avmeier@web.de> |
|||
|
|||
[C] extra/multimedia |
|||
|
|||
[L] GPL |
|||
[S] Stable |
|||
[V] 4.2 |
|||
[P] X -----5---9 800.000 |
|||
|
|||
[D] 662242579 cthumb-4.2.tar.gz http://dl.sourceforge.net/cthumb/ |
|||
|
@ -0,0 +1,80 @@ |
|||
diff -ruN cthumb-4.2/cthumb.in cthumb-4.2-new/cthumb.in
|
|||
--- cthumb-4.2/cthumb.in 2002-08-13 19:24:05.000000000 +0200
|
|||
+++ cthumb-4.2-new/cthumb.in 2004-04-04 12:59:31.842021168 +0200
|
|||
@@ -707,7 +707,7 @@
|
|||
my $pic = shift; |
|||
|
|||
# $pic =~ /^(.*?)(\.gif|\.jpg)?$/; |
|||
- $pic =~ m#^(.*/)?([^/]+)\.(gif|tif+|jpe?g)$#i;
|
|||
+ $pic =~ m#^(.*/)?([^/]+)\.(gif|tif+|jpe?g|png)$#i;
|
|||
# use thumb/ subdirectory if it already exists |
|||
my $base = (defined($1))? $1 : ''; |
|||
if (-w ($base . "thumb")) { |
|||
@@ -742,6 +742,8 @@
|
|||
} |
|||
for my $cmd ("djpeg", "pngtopnm", "giftopnm", "tifftopnm") { |
|||
my $pnm = `$cmd "$name" `; |
|||
+ if ($pnm eq "") { print "not with $cmd ... "; }
|
|||
+ else { print "with $cmd ..."; } ;
|
|||
return $pnm unless $?; |
|||
} |
|||
return; |
|||
@@ -1069,14 +1071,14 @@
|
|||
$pictureGeometry, |
|||
$pictureSize, |
|||
$pictureTitle, |
|||
- $pictureStory,
|
|||
- $pictureTimestamp,
|
|||
- $albumURL,
|
|||
- $albumTitle,
|
|||
- $geometryLink,
|
|||
- $themePrefix);
|
|||
- }
|
|||
- }
|
|||
+ $pictureStory,
|
|||
+ $pictureTimestamp,
|
|||
+ $albumURL,
|
|||
+ $albumTitle,
|
|||
+ $geometryLink,
|
|||
+ $themePrefix);
|
|||
+}
|
|||
+}
|
|||
} |
|||
|
|||
# This function is responsible for generating html for a single image that |
|||
@@ -1715,7 +1717,7 @@
|
|||
|
|||
my $pnm = ""; |
|||
if (!($pnm = &get_pnm($src))) { |
|||
- die "Cannot scale image `$dest`.";
|
|||
+ warn "Cannot scale image `$dest`, cthumb will fail!";
|
|||
} |
|||
# make pnmscale shut up (version in redhat 7.2 |
|||
# spits out stuff to stderr, even without -verbose, arggh) |
|||
@@ -1730,7 +1732,7 @@
|
|||
close PNMTOTHUMB; |
|||
print "done.\n"; |
|||
} else { |
|||
- die "Cannot scale image `$dest`.";
|
|||
+ warn "Cannot scale image `$dest`.";
|
|||
} |
|||
} |
|||
|
|||
@@ -1766,6 +1768,17 @@
|
|||
} |
|||
} |
|||
|
|||
+ if ($picname =~ /\.png$/i) {
|
|||
+ open FILE, "pngtopnm \"$picname\" | pnmfile |" or
|
|||
+ return "";
|
|||
+ $_ = <FILE>;
|
|||
+ if (/^stdin:\s+PPM raw, (\d+) by (\d+)/) {
|
|||
+ $width = $1; $height = $2;
|
|||
+ close FILE;
|
|||
+ return "$width" . "x" . "$height";
|
|||
+ }
|
|||
+ }
|
|||
+
|
|||
return ""; |
|||
} |
|||
|