Get featured image with custom size outside WordPress

This question is not about WordPress, but about PHP. Anyway, if you know the full image name, you know the desired filename has the following structure: imagename-300x*. This you can feed to the PHP function glob, which will return an array of all files matching the given pattern. So, supposing $image contains the path to the full image you would do:

$matches = glob ($image . '-300x');
$homef-image = $matches[0];