Convert Graphics

Topics related to the API, programming discussions & questions, coding tips, bugs, etc. should go here.
User avatar
Kilo
Posts: 330
Joined: Wed Dec 19, 2012 3:43 pm
Location: AC, Germany

Convert Graphics

Post by Kilo »

Hi,

well... I've changed something in the graphics.png file from Megatris.
Not really a big thing, only a black background in the Playfield.
After saving the file I've tried to build the project in AVR Studio...
But then there's an error like: The file can't be found (...\data\graphics.png)

I don't understand the problem. The graphic file doesn't changed really...
It seems like the AVR Studio get some errors about the changed file, but I don't know why!

When I replace the graphics.png with the original, then the buildprocess is going on without errors! :cry:

Greetings Dominik
The last digit of Pi is 7! I calculated this, as I counted to infinity yesterday!
User avatar
D3thAdd3r
Posts: 3221
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Convert Graphics

Post by D3thAdd3r »

Hmm strange. Could you post your altered version up; of course I have to ask you are sure its in the same spot with the same name/extension
User avatar
uze6666
Site Admin
Posts: 4801
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Convert Graphics

Post by uze6666 »

Strange...Could you attach a zipped version of the project that causes the problem. Please also post the whole error from the console log.
User avatar
Kilo
Posts: 330
Joined: Wed Dec 19, 2012 3:43 pm
Location: AC, Germany

Re: Convert Graphics

Post by Kilo »

ok, I will post the code later when I've got the time.

For example: In the directory /demos there's the whole code of Megatris, also the graphic.png in de data directory.
Now, if I open the graphic.png with Paint Shop Pro and save the file only without any changes, AVR Studio reports an error of file missing... "graphic.png". I've tried to modified the .xml and so on, but doesn't help.
well, graphic.png isn't missing. It's still in the same directory, no changed palette or anything else...

The sourcecode is exactly the same as the original... no changes, only the try to change some details in the main graphic!
But I'll post the code later on...

Dominik
The last digit of Pi is 7! I calculated this, as I counted to infinity yesterday!
User avatar
Kilo
Posts: 330
Joined: Wed Dec 19, 2012 3:43 pm
Location: AC, Germany

Re: Convert Graphics

Post by Kilo »

So, that's the report of AVR Studio 4 after trying to build the megatris project:

Code: Select all

Build started 20.12.2012 at 12:04:31
gconvert ../data/gconvert.xml
process_begin: CreateProcess(NULL, gconvert ../data/gconvert.xml, ...) failed.
make (e=2): Das System kann die angegebene Datei nicht finden.
make: *** [../data/graphics.inc] Error 2
Build failed with 1 errors and 0 warnings...
remember, I only open the "graphics.png" in Paint Shop Pro and save it again without changes!
Only when I replace the saved file with the original file, AVR reports no error and build the .hex
The last digit of Pi is 7! I calculated this, as I counted to infinity yesterday!
User avatar
Roukan
Posts: 113
Joined: Sat Oct 27, 2012 7:50 pm
Location: Lancashire / England

Re: Convert Graphics

Post by Roukan »

The only thing that comes to mind, and its a long shot I guess:

When you save the modified PNG in PSP is it perhaps not being saved as an PNG-8 (256 colour palette).

Like i say it's a wild guess and probably not this, as I use Programmers Notepad 2 instead of AVR studio I can't offer any ideas on that front.


Cheers


Roukan / Jim
User avatar
Kilo
Posts: 330
Joined: Wed Dec 19, 2012 3:43 pm
Location: AC, Germany

Re: Convert Graphics

Post by Kilo »

I've checked the format, but it's still png-8 with 256 colors... :(
No changes!
The last digit of Pi is 7! I calculated this, as I counted to infinity yesterday!
User avatar
uze6666
Site Admin
Posts: 4801
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Convert Graphics

Post by uze6666 »

Can you post the faulty image, I'll check if it also fails on my side?

Here's the original where I changed the background to black. If you use this one, does it work?
graphics.png
graphics.png (8.65 KiB) Viewed 9230 times
User avatar
Kilo
Posts: 330
Joined: Wed Dec 19, 2012 3:43 pm
Location: AC, Germany

Re: Convert Graphics

Post by Kilo »

Hi Uze,
thank you... but it still doesn't work!
Also with your pic... only if I replace the faulty image with the original from the download source it works and I can build the project. :(
So it doesn't even matter if I open the image and save it without changes, the buildprocess stoped.

Well, then it only could be the fault of AVR studio or with a wrong convert with the gconvert.xml, I don't know...
but it's very frustrating! :(((((
The last digit of Pi is 7! I calculated this, as I counted to infinity yesterday!
User avatar
Kilo
Posts: 330
Joined: Wed Dec 19, 2012 3:43 pm
Location: AC, Germany

Re: Convert Graphics

Post by Kilo »

IT WORKS!!!!! :D

oh my god...
So, first I changed the whole paths in the makefile and the gconvert.xml!
AVR reporst then NO errors, but the image on tv was the same as original.
So I tried to convert manuel with gconvert.exe in /bin
But there were missing 2 .dll
Ok, downloaded from the net, again gconvert the graphic.png and build up the project again...
and now, it works!
Well, I think it's like going upstairs instead of using an elevator and instead of wasting only 5 minutes, I've wasted more than 1 h but iiittt woooorks now!! :D
The last digit of Pi is 7! I calculated this, as I counted to infinity yesterday!
Post Reply