Remove file_new_name_ext from file_dst_name

See all posts Reply

Remove file_new_name_ext from file_dst_name new!
by yono, 15 years, 8 months ago
can i remove extension from $file_dst_name ??Reply
Re: Remove file_new_name_ext from file_dst_name new!
by colin, 15 years, 8 months ago
I am not too sure I understand what you want to do. Can you give me an example?Reply
Re: Remove file_new_name_ext from file_dst_name new!
by yono, 15 years, 8 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, 15 years, 8 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, 15 years, 7 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, 15 years, 7 months ago
sorry,
that code was work,
thanks.Reply
Re: Remove file_new_name_ext from file_dst_name new!
by colin, 15 years, 7 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