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 - maninboots

Pages: [1]
1
Graphics / Image.LoadFromFile("sprite.tga") Won't load the im
« on: August 21, 2007, 09:46:52 pm »
It seems I got it to work, all of a sudden it takes .jpg .png everything, with or without alpha channels. I have no idéa of what I did, but it works!

Finally, I can start creating stuff.

Thanks! I'll be back sometime with more errors, I can feel it :) :D

Edit: But I do get 20 Warnings .. hmm

2
Graphics / Image.LoadFromFile("sprite.tga") Won't load the im
« on: August 21, 2007, 08:39:56 pm »
Quote
Just link with sfml-graphics-d.lib instead of sfml-graphics.lib (the same for other libraries -- sfml-window-d.lib and sfml-system-d.lib).


Ok Thanks ! :D

Quote
Photoshop doesn't support alpha channels in TGA


Sorry, I meant that Photoshop doesn't support automatic alpha channel (like for GIF and PNG), you have to make your own alpha channel in the channel window.

Quote
Yes, alpha channels are properly loaded Wink


Really ? I did make an alpha channel in photoshop and then saved it as an TGA, it didn't load. Then I tried with TGA Tool and made an alpha channel , didn't load either.

Quote
As I said you can load the alpha channel directly, but if you want to make a particular color transparent after loading the image in your program, you can use the sfImage::CreateMaskFromColor function.


Ok, I'll use that function if nothing else works!

Thanks

3
Graphics / Image.LoadFromFile("sprite.tga") Won't load the im
« on: August 21, 2007, 08:18:42 pm »
Quote from: "lubos"
Quote from: "maninboots"

Edit: Well I can debug in release mode so I guess this is solved !! :D

debugging symbols shouldnt be produced in release mode, maybe it can break your program but it shouldnt be able to see some really detailed info..


Ok, so how do I fix it so I can run it in Debug Mode ?

And another thing, can I load images with alpha channels ?
Photoshop doesn't support alpha channels in TGA so I tried to create an alpha with "TGA Tool", but I can't load that image in the program.

What's the use of sprites (in games) if you can't have an alpha channel ?
Is there a way to like - assign a special color to be the Alpha Channel Color (Like DirectX?),
so that I can output the image with like an Pink background and then let SFML make it transparent ?

Thanks

4
Graphics / Image.LoadFromFile("sprite.tga") Won't load the im
« on: August 21, 2007, 07:33:18 pm »
Oh my god, I feel so stupid.. it worked in release mode ? How ?
Can I get it to work in debug mode also ?

Thanks for all the help !! :D

Edit: Well I can debug in release mode so I guess this is solved !! :D
THANKS! Very good support.. thumbs up for SFML and Laurent!

5
Graphics / Image.LoadFromFile("sprite.tga") Won't load the im
« on: August 21, 2007, 05:59:57 pm »
How exactly did you do that ? I'm very new to C++ (been learning VB.Net in one year and I switched to C++ like 5 days ago).
Guess it's something basic that I've forgotten..

6
Graphics / Image.LoadFromFile("sprite.tga") Won't load the im
« on: August 21, 2007, 12:06:56 pm »
Ok, now thats really weird. Did you change anything, anything at all ?
If not, I'll try and reinstall Visual Studio and SFML.

Thanks for the help ! : :)

7
Graphics / Image.LoadFromFile("sprite.tga") Won't load the im
« on: August 21, 2007, 11:47:16 am »
Quote
maybe you can send your project files to someone that have visual c++ and see if it will works for him..my ide can import vc projects, however no vc compiler here on linux.. Confused


Ok, here's my project folder:
http://www.hakucenter.com/spriteTest.zip

8
Graphics / Image.LoadFromFile("sprite.tga") Won't load the im
« on: August 21, 2007, 02:19:26 am »
Quote from: "s_p_oneil"
Did you make sure to put the DLL's in extlibs\bin in your PATH somewhere?


Well I did get an error first that said something like "Can't find DevIL.dll" .
So I moved that to the debug folder and the error message dissapeared so, I think I did!

Edit: Anyways, got all the DLL files in the debug and the directory where the .sln is so, can't be the dlls :(

9
Graphics / Image.LoadFromFile("sprite.tga") Won't load the im
« on: August 21, 2007, 02:11:57 am »
doesn't work either.. getting mad at this error!

I'm starting to think that this problem is not within the code, it's propably some settings or linking I've done wrong, or mayby I installed SFML wrong.
But then again, alot of the other tutorials work.

I've got this in the Linker-Input:
sfml-main.lib sfml-window.lib sfml-system.lib sfml-graphics.lib

that should be alright, and I'm creating an Empty Win32 Console Application at the start, that's right, right ?

Getting CRAZED at this error!

Thanks for all the help though!

Edit: But the weird thing is that no one else got this problem!

10
Graphics / Image.LoadFromFile("sprite.tga") Won't load the im
« on: August 21, 2007, 12:34:10 am »
Didn't work. Already had my image file both in the directory where the .sln is and the debug.
I even tried to copy the image in every directory of my project's directory, didn't work either.

It can't be that the image isn't located. It must be something in the
sfImage::LoadFromFile() Function.
Something in that function goes wrong and returns the error.

When I debug it goes through alot of files but you never see anything about the LoadFromFile() Function, and nothing about the string "Failed to load image from file".
So I can't locate the error.

11
Graphics / Image.LoadFromFile("sprite.tga") Won't load the im
« on: August 20, 2007, 11:47:39 pm »
Yeah, it returns the error "Failed to load image from file" in the console.
So not in the builder/compiler/linker.

12
Graphics / Image.LoadFromFile("sprite.tga") Won't load the im
« on: August 20, 2007, 11:19:40 pm »
Ok, thats weird. The warnings doesn't matter - I just wanna get my sprites to show on the screen :)
 Could someone with Visual Studio 2005 like make a solution with sprites and upload it somewhere, so I could try to compile it and see if it works?

13
Graphics / Image.LoadFromFile("sprite.tga") Won't load the im
« on: August 20, 2007, 10:53:21 pm »
I've tried using the "Displaying a Sprite" tutorial source file, and it's the same errors there. I guess it's this that calls the error:

Code: [Select]

if (!Image.LoadFromFile("sprite.tga"))
        return EXIT_FAILURE;


It compiles without errors.. i've got 2 warnings tho'

Code: [Select]

Warning 1 warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification test01SFML

Warning 2 warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library test01SFML


But the warnings only occurs when I include the SFML/Window.hpp header, and that is not needed in the tutorial so I guess it has nothing to do with this problem.


As you said I've tried the absolute path and I've tested to run the executable.
My OS is 32bit Windows XP Pro and I use MS Visual Studio 2005.

Thanks

14
Graphics / Image.LoadFromFile("sprite.tga") Won't load the im
« on: August 20, 2007, 09:02:19 pm »
Hello!  I'm new to SFML but so far it looks great, except that I can't get my images to load properly.
The program Builds just fine but it always returns the "Failed to load image from file" error.

I've tried TGAs, JPGs, PNGs, even 1bit BITMAPS, but nothing works.
I'm keeping my files in: [ \Visual Studio 2005\Projects\{name}\debug\ ], and that should be right, right ? :P
I've even tried to change the image line to "C:\\sprite.tga" and moving the picture to the root map but it doesn't work.

I've tried using my own code and the tutorial code. Please help!

Regards Mattias from Sweden ! :D

Pages: [1]
anything