after picture uploaded no normal thumb is displayed after picture uploaded no normal thumb is displayed
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

after picture uploaded no normal thumb is displayed

Started by giorgio79, February 19, 2007, 07:32:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

giorgio79

Hello Guys,

I came across a few pictures that do not upload properly in CPG

There are no error messages, it is just that no normal size version is created just a thumbnail, and a white area is displayed when I click on the thumb.

I am attaching 3 of them here, I downloaded them from a free foto site.

I understand this may do with EXIF stuff and GD1? Anyway, my goal is to have a normal version created, as the last thing I want my visitors to see is that white blank photo area.

I am currently reading on the posts but just in case I thought I post this.

Can you please advise?

Thank you,

Gyuri

giorgio79

hmmm

just fouind this post

http://forum.coppermine-gallery.net/index.php?topic=37776.0

Nibbler mentions here that the pic may be too small and does not qualify for normal size version...

Interesting. I modded my picmgmt file to uinlink the original after upload to save space, so this may be the issue.

With this knowledge, the question becomes, can I force (in an easy way) coppermine to create a normal version?

Cheers,
Gyuri

giorgio79


giorgio79

One last thing,

I checked my "Max width or height of an intermediate picture/video" and it is set to 600.

But just because the original is not this big, I still think there should be a normal_ version created, because if not, when we click on the thumbnail, we will see the blank page?

What do you think?

giorgio79

Ok, I solved my problem :)

Basically, I introduced an unlink function in picmgmt which removed the originals after upload...

Now this created this issue, that smaller photos that did not meed the max setting for the intermediate pics were not created, but I was also deleting the originals, so this posed a problem.

I modded my unlink function like this

if (file_exists($normal)) {
@unlink($image);
};


which I placed right after a long SQL query in picmgmt.inc.php

'{$CURRENT_PIC_DATA['owner_id']}', '{$CURRENT_PIC_DATA['owner_name']}','{$CURRENT_PIC_DATA['title']}', '{$CURRENT_PIC_DATA['caption']}', '{$CURRENT_PIC_DATA['keywords']}', '{$CURRENT_PIC_DATA['approved']}', '{$CURRENT_PIC_DATA['user1']}', '{$CURRENT_PIC_DATA['user2']}', '{$CURRENT_PIC_DATA['user3']}', '{$CURRENT_PIC_DATA['user4']}', '{$CURRENT_PIC_DATA['pic_raw_ip']}', '{$CURRENT_PIC_DATA['pic_hdr_ip']}', '{$CURRENT_PIC_DATA['position']}')";
    $result = cpg_db_query($query);

Cheers,

Gyuri