BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 03-08-2010, 09:57 AM   #1 (permalink)
New Member
 
Join Date: Mar 2010
Model: 8330
PIN: N/A
Carrier: Sprint
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Restrictions on Using Images?

Please Login to Remove!

Perhaps I'm either super retarded and can't figure out what to search for, or maybe I'm super retarded and can't figure out how to program :-p. I can't find the solution to this anywhere.

So here's the deal:
I'm trying to get a simple image to show up on the Simulator through something as simple as a hello world program. I've tried bitmaps, I've tried png files, I've used interlacing and not interlacing, tried editing and saving with photoshop and mspaint, and the images are less than 40 pixels in height and width. Nothing I try allows the picture to show up. So I've tried using the demo TicTacToeDemo that came with the development environment. Their pictures show fine. If I use my own pictures or even just edit theirs in any way, they suddenly aren't allowed to show. What gives? Am I missing some kind of "right" to use images? Please Help! Thanks!
Offline  
Old 03-08-2010, 12:53 PM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

What is not working? Show a code snippet.
Offline  
Old 03-09-2010, 08:54 AM   #3 (permalink)
New Member
 
Join Date: Mar 2010
Model: 8330
PIN: N/A
Carrier: Sprint
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think I was slightly too ambiguous when I mentioned the TicTacToeDemo. I used the exact code that was in it and changed their getBitmapResource("o.png") to getBitmapResource("myPic.png"). I also simply editted the image "o.png" and left the code 100% the same. In so doing, in both cases, pictures failed to appear all together. That's why I'm wondering if there's some kind of restriction on using my own images. It's absolutely bizzare. I would paste some code anyway for you, but I'm at work and don't have it. Either way, it's 100% TicTacToeDemo code.
Offline  
Old 03-09-2010, 09:21 AM   #4 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

Did you add your "myPic.png" to the project?
Offline  
Old 03-09-2010, 09:29 AM   #5 (permalink)
New Member
 
Join Date: Mar 2010
Model: 8330
PIN: N/A
Carrier: Sprint
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, I placed it in the exact same folder as the other images. And the "o.png" that I edited, I left where it was. Is there some other means of "adding" it to the project than simply location?
Offline  
Old 03-09-2010, 09:43 AM   #6 (permalink)
New Member
 
Join Date: Mar 2010
Model: 8330
PIN: N/A
Carrier: Sprint
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

::SMACKS HEAD::
Let me guess, I have to right-click the project, click "Add File to Project....", and select my image? I now remember that I didn't really reuse the name of "o.png". I accidentally lied :-p. So it wouldn't have been registered if that is indeed how you do it. Searching for "add image to project" yielded results that could have saved me hours of banging my head on the desk. I'll try that when I get home. Let me know if there's anything more I need to know about this.

Thanks!!
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.