Look! The bypass even works!
I can edit and save a non-power of two image. Why can I not 'create' one?
#include <iostream>
#include <SFML/Graphics.hpp>
using namespace std;
int main()
{
sf::Image Test;
//Test.Create(2400,500,sf::Color(0,0,0));
Test.LoadFromFile("Test.jpg");
sf::Sprite Sprite;
Sprite.SetImage(Test);
Sprite.SetPosition(0,0);
int X = 0;
while(X < Test.GetWidth())
{
Test.SetPixel(X,0,sf::Color());
X++;
}
sf::RenderWindow App(sf::VideoMode(800,400,32),"Graphics");
while(App.IsOpened())
{
sf::Event Event;
while(App.GetEvent(Event))
{
if(Event.Type == sf::Event::Closed)
{
App.Close();
}
}
App.Clear();
App.Draw(Sprite);
App.Display();
}
Test.SaveToFile("NonPowerOfTwo.jpg");
return 0;
}