Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - DFPercush

Pages: [1]
1
Graphics / Re: sf::Image::loadFromFile test case
« on: July 07, 2012, 02:47:18 am »
Since you're curious, I have some digital scans of books which are in this format. If there's something that can convert them on the fly or in batches that would be fine, but there are thousands of them. Manually converting them is out of the question.

2
Graphics / Re: sf::Image::loadFromFile test case
« on: July 06, 2012, 09:21:58 am »
Thanks for the reply Laurent. :)  I missed that because my program doesn't run in a console. It's a win32 program which emulates the argc/argv setup. Upon calling freopen() on stderr, I discovered this:

Failed to load image "a.png". Reason : PNG not supported: 8-bit only

Hmm, why's it not supported? It's not a limitation of OpenGL is it? Does SFML use libpng? I'll probably try that next unless someone knows for sure it won't handle it either.



3
Graphics / Re: sf::Image::loadFromFile test case
« on: July 06, 2012, 03:32:55 am »
Unless I'm missing something, there is no message. The function just returns false. Is there a getError function I should be calling or anything like that?

P.S. I verified that the maximum texture size on my hardware is 2048x2048, and the image is 1554x1200. I thought the size might be a problem but it seems within the limits.

4
Graphics / sf::Image::loadFromFile test case
« on: July 05, 2012, 05:28:59 am »
Hi all. I have a certain png file I'm using to test my app:

https://dl.dropbox.com/u/10392115/sfImageTest_4hjki73cd.png

, and loadFromFile simply will not load it (returns false).  My app works with another png image though. The failed image will load in windows photo gallery, IrfanView, and Firefox, so the file is valid. I'd like to get a few people to please try to load this particular image (as a sf::Image, not texture) and give me some feedback on whether it works for you. I'm pretty sure it's not an error in my code but I'll post it anyway. Using SFML-2.0-rc binaries, but downloading latest snapshot right now. My system is Windows Vista 32 bit edition, but running on a AMD Turion 64 dual core laptop (That's just the way the oem set it up :-/) with integrated graphics ATI Radeon X 1200 chipset, OpenGL 2.0 with software shader emulation. The compiler is MS Visual Studio 2010, but like I said I'm just using the RC binaries for now.   When I get back home to my other PC next week I'll post an update.

#include <SFML/Graphics.hpp>
//...
int xmain(int argc, char** argv)
{
        if (argc != 3) return 1;

        sf::Image img;
        string src, dest;
        src = argv[1];
        dest = argv[2];

        if (!img.loadFromFile(src)) return 2;
        if (!img.saveToFile(dest)) return 3;
        else return 0;
}
 

5
Graphics / Re: sf::Texture and OpenGL
« on: May 30, 2012, 12:51:41 am »
Hate to resurrect a dead thread, but I don't think anyone ever explicitly said this: The OpenGL coordinate system, if no transformations are applied besides the identity matrix, puts the origin at the bottom left of the screen, when dealing with vertices, and at the bottom left of an image when dealing with textures. The positive Y axis points up in the plane of the screen/image, and the Z axis points out of the screen toward the viewer, meaning openGL is a right handed coordinate system. Of course, one can reverse any of these with a transformation matrix which simply negates the desired axis.

Pages: [1]
anything