forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 upload => Topic started by: giorgio79 on February 19, 2007, 07:32:10 pm
-
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
-
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
-
Ah found the solution here
http://forum.coppermine-gallery.net/index.php?topic=37092.0
Thank you if you read my post :)
-
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?
-
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