Member
Member
Largo   2010-09-08, 06:43
#1

Hello,

When I crop an thumbnail, after done one or more are not showing in menu. I used external places for images, but this is not a problem, because photos always return ( FireBug ), but in HTML page I cannot see them.

For better fun, when I used FireBug and check element they're... exists, so where is the fail of script? How can I fix that? I try with headers, imagecreatefrom... functions, nothing work.

Administrator
Administrator
acrylian   2010-09-08, 08:46
#2

I fear I do not really understand your problem. When are images not seen by what HTML page and in what menu they don't show up?

Member
Member
Largo   2010-09-08, 09:14
#3

When cropping thumbnails. I think I found a problem:

SERVERCACHE . getImageCacheFilename(filesystemToInternal($album), filesystemToInternal($image), $args)

When I used static files evyrthink is OK, so in that line is problem. Please, check it.

Administrator
Administrator
acrylian   2010-09-08, 09:32
#4

Please provide some info in which context you are actually using this.

Member
Member
Largo   2010-09-08, 09:46
#5

What do You mean? Trace all when i.php is used to create/show thumbnails. That fails sometimes and for no reason. I add a static file and when I have ~40 albums I see all thumbnails.

Member
Member
Largo   2010-09-08, 11:12
#6

functions-image.php
function: cacheImage

This is the function where script looses new thumbnails...

Administrator
Administrator
acrylian   2010-09-08, 11:23
#7

Do you encounter this on your Zenphoto site when using a standard Zenphoto theme or when? Are you trying to precache images maybe?

You did also mention something of external. So do you use i.php directly and when from where do you use it. Same server, different server, same site?

If on a Zenphoto theme we have images theme and object model functions to create thumbs as well.

This all might be important to find any possible bug.

Member
Member
kagutsuchi   2010-09-08, 15:27
#8

It would probably help if you told us what imaging library you're using as well. (GD or Imagick)

Member
Member
Largo   2010-09-09, 07:41
#9

GD Lubrary ( I use zenPhoto 1.2.9 ). This is the i.php showing code of images:

`if (!$debug) {

if(file_exists($path)) {

    header('Last-Modified: '.gmdate("D, d M Y H:i", $fmt).' GMT');

    $suffix    = getSuffix($newfilename);

    $imageSize = filesize($path);

    switch ($suffix) {

        case 'bmp':

            $suffix = 'wbmp';

            break;

        case 'jpg':

            $suffix = 'jpeg';

            break;

        case 'png':

        case 'gif':

        case 'jpeg':

            break;

        default:

            pageError(405, gettext("Method Not Allowed"));

            exit();

    }

    $imageFunction = 'imagecreatefrom'.$suffix;

    if(function_exists($imageFunction)) {

        $imageObject = $imageFunction($path);

        if(is_resource($imageObject)) {

            $imageShowFunction = 'image'.$suffix;

            if(function_exists($imageShowFunction)) {

                header('Content-Type: image/'.$suffix);

                header('Content-Length: '.$imageSize);

                $imageShowFunction($imageObject);

                imagedestroy($imageObject);

                unset($imageFunction);

                unset($imageObject);

                unset($imageShowFunction);

            }

        }

    }

    /*if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && trim($_SERVER['HTTP_IF_MODIFIED_SINCE']) == gmdate("D, d M Y H:i", $fmt).' GMT') {

        header('HTTP/1.0 304 Not Modified');

        header('Content-Length: 0');

    }*/

}

} else {

echo "\nImage: 

";

}`

Administrator
Administrator
acrylian   2010-09-09, 08:43
#10

Well, 1.2.9 is a little old. We have only resource to support the current version which is 1.3.1.2. Please install that and try with it.

From the example: Why don't you use the object model and the existin image functions? I might not understand what you are doing why of course.

Member
Member
Largo   2010-09-09, 09:00
#11

I used external place for photos and other data that is not in database. So, I write new classes to get information about that files, so there is no problem.

I have a path, but I can't use Location header, because that data is hidden from people and I don't have any public domain which can saw them, so I read them as You see upper. This is OK, but why sometimes after modify thumbnails I see only URL with anchor, to better fun when I click in Firefox 'Refresh image' they're shown, so?

Sometimes they not returned the image but only for first click, files was created, added to DB, everythink cool, but showing fail. You know why I do that?

PS. I cannot update zenPhoto as fast as You can do. This is modify in multiple places, so updating after ~2 weeks is not fun for me, for You too, as You work as developer and You know about merging and finding differences :-)

Administrator
Administrator
acrylian   2010-09-09, 12:56
#12

Well you know that the image functions from Zenphoto are meant to be used with Zenphoto and optimized that way. If you use them outside Zenphoto context you might better go with the php image libary functions directly. (GD - or in current release Imagick). Unless I missundertood.
http://php.net/manual/en/book.image.php

[i]PS. I cannot update zenPhoto as fast as You can do. This is modify in multiple places, so updating after ~2 weeks is not fun for me, for You too, as You work as developer and You know about merging and finding differences :-)[/i]
Well, if you don't modify the core files - which is exactly for that reason not recommended - that is not that much of a problem normally.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.