I’m using this PHP plugin for image manipulation: http://wideimage.sourceforge.net/
This is my code:
WideImage::load('images/image_test.jpg')
-> resize(300, 150)
-> output('jpg');
And this is the result:

If you look at the dimensions of the screenshot, you’ll see they do not coincide with what I told the dimensions to be.
What is going on?
Well, it looks like it tries to maintain the aspect ratio (height / width). You probably don’t want to get your images flattened or stretched, but there should be a setting for this. Maybe setting the
$fitparameter to “fill” will help: http://wideimage.sourceforge.net/wp-content/current/doc/WideImage/WideImage_Image.html#methodresizeLE: On the other hand, perhaps you should consider cropping, if you want to change the image size, without altering its aspect.