[ansel] Import pictures from folder structure

Michael J Rubinsky mrubinsk at horde.org
Fri Mar 9 15:41:22 UTC 2012


Quoting Samuel Wolf <samuel_wolf at web.de>:

> -----Ursprüngliche Nachricht-----
> Von: "Michael J Rubinsky" <mrubinsk at horde.org>
> Gesendet: 29.02.2012 18:05:10
> An: ansel at lists.horde.org
> Betreff: Re: [ansel] Import pictures from folder structure
>
>>
>> Quoting Samuel Wolf <samuel_wolf at web.de>:
>>
>>> What is wrong there?
>>>
>>> Schwerer Fehler:
>>> Unbekannter Dateityp "/tmp/albums/kollegen/P1010028.JPG" kann nicht
>>> verarbeitet werden.
>>>  
>>> 1. Ansel_Cli_Helper_Local->processDirectory() /usr/bin/ansel:164
>>> 2. Ansel_Cli_Helper_Local->processDirectory() /usr/bin/ansel:640
>>> 3. Ansel_Cli_Helper_Local->processDirectory() /usr/bin/ansel:640
>>> 4. Ansel::getImageFromFile() /usr/bin/ansel:621
>>>  
>>> ====================
>>> root at mail:/tmp# file /tmp/albums/kollegen/P1010028.JPG
>>> /tmp/albums/kollegen/P1010028.JPG: JPEG image data, EXIF standard 2.1
>>>
>>
>> For some reason Horde_Mime_Magic doesn't think it's an image. You will
>> have to track this down in ansel/lib/Ansel.php. In the
>> getImageFromFile() method, add:
>> <code>
>> var_dump($mime_type);
>> </code>
>>
>> after line 438, on the line before the if statement and post the
>> results for that image.
>
> There is no output.
> Is the code of Ansel.php correct?
>
> [...]
> 439        $image = array(
> 440            'image_filename' => basename($file),
> 441            'image_caption' => '',
> 442            'image_type' => $mime_type,
> 443            'data' => file_get_contents($file));
> 444
> 445        // Override the array e.g., if we're changing filename to  
> something else.
> ---> var_dump($mime_type);
> 446        if (count($override)) {
> 447            $image = array_merge($image, $override);
> 448        }
> [...]

Put it *before* the $image = ... statement.


-- 
mike

The Horde Project (www.horde.org)
mrubinsk at horde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6096 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.horde.org/archives/ansel/attachments/20120309/c180f63e/attachment.bin>


More information about the ansel mailing list