summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 70a182b)
raw | patch | inline | side by side (parent: 70a182b)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 1 Mar 2010 08:48:16 +0000 (08:48 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 1 Mar 2010 08:48:16 +0000 (08:48 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15782 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/update-gosa | patch | blob | history |
diff --git a/gosa-core/update-gosa b/gosa-core/update-gosa
index be1de84a2d90655e40ba4101bbf61538b427f95e..ace236ae48befbb608990b2b8adcf192093c23c2 100755 (executable)
--- a/gosa-core/update-gosa
+++ b/gosa-core/update-gosa
$warnings[]= "Warning: images $indexPath seems to be a duplicate of ".array_search($checksum, $checksums);
$duplicates[$indexPath]= array_search($checksum, $checksums);
$duplicates[$greyIndexPath]= preg_replace('/\.png$/', '-grey.png', array_search($checksum, $checksums));
- continue;
} else {
$checksums[$indexPath]= $checksum;
}
// Insert source image...
- // And eventually convert it to grey before
- if (preg_match('/-grey\.png$/', $imagePath)) {
- if (!function_exists("imageFilter")){
- exec("convert ".$paths[$imagePath]." -colorspace Gray /tmp/grey-converted.png");
- $src= imageCreateFromPng("/tmp/grey-converted.png");
- } else {
- $src= imageCreateFromPng($paths[$imagePath]);
- imageFilter($src, IMG_FILTER_GRAYSCALE);
- }
- } else {
- $src= imageCreateFromPng($paths[$imagePath]);
- }
-
- // Merge image
- imageCopyResampled($dst, $src, $x, $y, 0, 0, $imageWidth, $imageHeight, $imageWidth, $imageHeight);
- imageDestroy($src);
-
- // Eventually overload with grey part
+ // Duplicate?
if (isset($duplicates[$imagePath])){
$imageHeight= $heights[$duplicates[$imagePath]];
$imageWidth= $widths[$duplicates[$imagePath]];
$x= $posX[$duplicates[$imagePath]];
$y= $posY[$duplicates[$imagePath]];
+ } else {
+
+ // Eventually convert it to grey before
+ if (preg_match('/-grey\.png$/', $imagePath)) {
+ if (!function_exists("imageFilter")){
+ exec("convert ".$paths[$imagePath]." -colorspace Gray /tmp/grey-converted.png");
+ $src= imageCreateFromPng("/tmp/grey-converted.png");
+ } else {
+ $src= imageCreateFromPng($paths[$imagePath]);
+ imageFilter($src, IMG_FILTER_GRAYSCALE);
+ }
+ } else {
+ $src= imageCreateFromPng($paths[$imagePath]);
+ }
+
+ // Merge image
+ imageCopyResampled($dst, $src, $x, $y, 0, 0, $imageWidth, $imageHeight, $imageWidth, $imageHeight);
+ imageDestroy($src);
}
// Store style