Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialpdiaz
16,073 PointsImage Problem
Hey guys, I need help to import a picture I created from gimp into eclipse. I keep getting an error from the console log that reads "Invalid file name: must contain only [a-z0-9_.]". What should I do? Any help would be much appreciated.
pdiaz
16,073 PointsIt's still not working, I don't know what to do cause I have also tried using web images and it keeps giving me the same error.
Mike Dunford
661 PointsQ1) What format is the image in? (jpg, png, tiff etc.) Q2) What have you named it? Q3) Talk us through the steps you're taking to import the image into your project.
I have to sleep but hopefully someone else will be able to help with this info ^^
pdiaz
16,073 PointsThe format is in xcf. and I named it img_bknd. Lastly, I dragged the image into the mdpi
Mike Dunford
661 PointsAh, xcf is the GIMP file format - instead of going "File > Save As..." you'll need to go to "File > Export As..." and use a format like jpg or png.
pdiaz
16,073 PointsThanks that worked
Mike Dunford
661 PointsGood stuff! :)
1 Answer
Vlatko .
2,526 PointsChange the file name.
pdiaz
16,073 Pointschange it to what?
Mike Dunford
661 PointsWhat is the image of/what's it for?
pdiaz
16,073 PointsIt's for the background of my app
Mike Dunford
661 PointsMike Dunford
661 PointsIt pays to think about how you're going to name your assets before building your application (otherwise it can get messy!), however it's ultimately down to you what you want to call it.
Personally I'd name it something like 'img_bknd' or simply 'bknd'. The main thing is the name differentiates it from your other assets and describes what it is at a glance. Hope this helps!