I have been working on various things setting up for a small game program and came across something odd. I am no an artist by any stretch so I found a placeholder graphic on opengameart to use as a ship, however I couldn't find a suitable size. I thought scaling would be fine so I did so and plopped the sprite in the middle of the display and it looked off. Thinking it had to do with the scaling I investigated a little.
The image is 150 by 120 pixels and the render area is 320 by 200. I scaled the image by 0.5f for both width and height, placed it at what should be the center of the render area and printed out the screen render size, sprite global bound and local bounds in the console window. What was odd to me is that the local bounds size of the sprite shows to be 150 width and 120 height, just as the original image, but the global shows as 60 width and 75 height. Note that the values are inverted. It should show as 75 width and 60 height. I did make sure to recheck the code used and it seemed in the proper order.
sf::FloatRect shipBounds;
shipBounds = shipSprite.getLocalBounds();
std::cout << "Ship local bounds size...X: " << shipBounds.width << " Y: " << shipBounds.height << std::endl;
shipBounds = shipSprite.getGlobalBounds();
std::cout << "Ship global bounds size...X: " << shipBounds.width << " Y: " << shipBounds.height << std::endl;
Note that shipSprite is defined as sf::Sprite higher up in the code.
Edit: Sorry I forgot to put the version of SFML I used was compiled from the master branch on GIT. 2.3.x