Remove file_new_name_ext from file_dst_name

See all posts See thread Reply

Re: Remove file_new_name_ext from file_dst_name new!
by yono, 16 years, 10 months ago
if file_dst_name : test.jpg than i just want be testReply
Re: Remove file_new_name_ext from file_dst_name new!
by colin, 16 years, 10 months ago
You can't do that directly with the class. But it is easy enough to just rename the file via PHP after it has been processed.Reply
Re: Remove file_new_name_ext from file_dst_name new!
by yono, 16 years, 10 months ago
thanks,

and here i have 1 more question:
i want the resized image is in size max 500 (width | height), and if the source image smaller it must be stretched. how i can i config it??

here is my code that doesn't work
$imageb->file_new_name_body = 'test';
$imageb->image_resize = true;
$imageb->image_x = 500;
$imageb->image_ratio_y = true;
$imageb->process('upload/thumb/');
Reply
Re: Remove file_new_name_ext from file_dst_name new!
by yono, 16 years, 10 months ago
sorry,
that code was work,
thanks.Reply
Re: Remove file_new_name_ext from file_dst_name new!
by colin, 16 years, 10 months ago
To set the width and the height to be 500px maximum, you can do this:
$imageb->file_new_name_body = 'test';
$imageb->image_resize = true;
$imageb->image_x = 500;
$imageb->image_y = 500;
$imageb->image_ratio = true;
$imageb->process('upload/thumb/');
Reply