Closed (fixed)
Project:
Image
Version:
4.6.x-1.x-dev
Component:
image.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
28 Apr 2005 at 14:22 UTC
Updated:
15 Mar 2007 at 18:32 UTC
Jump to comment: Most recent file
Comments
Comment #1
pegmonkey commentedI found that it did make the derivatives. However, all of mine ended up being the same size. It didn't scale them at all. I ended up with preview images named .preview.jpg which is correct, however they were the same size as the original image. The thumbnails got created and were the same size also. Also, the table "file" didn't have the the filename field populated for the entries. I looked at the script, but since I'm new to php, I'm not sure what's going on with it.
Thanks.
Comment #2
pegmonkey commented$label not declared changed query from this
db_query("INSERT INTO {files} (fid, nid, filename, filepath, filemime, filesize, list) VALUES (%d, %d, '%s', '%s', '%s', '%d', %d)",
$fid, $row->nid, $label, file_create_path($filename), $row->filemime, $row->filesize, 0);
to
db_query("INSERT INTO {files} (fid, nid, filename, filepath, filemime, filesize, list) VALUES (%d, %d, '%s', '%s', '%s', '%d', %d)",
$fid, $row->nid, $size['label'], file_create_path($filename), $row->filemime, $row->filesize, 0);
I'm still trying to figure out why it won't resize...
Comment #3
pegmonkey commentedOk, it DOES resize, create the db entries now too.. however, $row->filesize doesn't populate the db with the correct file size yet... still working on that.
Comment #4
pegmonkey commentedI got the bugs worked out that mattered to me. It now populates the "files" table with the correct filesize and filename info. I'd recommend removing all "files" table entries that don't conatain "_original", but that's just me. Make sure to read the script before using. Thanks again to njivy. It also makes a great tool if you should decide to change add or delete derivative sizes.
Comment #5
msameer commentedIt's a must to empty the table otherwise you'll end up with multiple thumbs, I also was incrementing the min nid manually each run.
Comment #6
drewish commentedhopefully everyone that's going to use this has.
Comment #7
(not verified) commented