Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Whats wrong with this picture?
Index -> Programming, Turing -> Turing Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
nonamedude




PostPosted: Wed May 13, 2009 7:02 pm   Post subject: Whats wrong with this picture?

What is it you are trying to achieve?
Import a picture from the same directory .


What is the problem you are having?
Does not display


Describe what you have tried to solve this problem
Reading the walkthrough

Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
Turing:


var mypic : int := Pic.FileNew ("World of warcraft.bmp" ?)
Pic.Draw (mypic, maxx div 2, maxy div 2, 0)




Please specify what version of Turing you are using
Latest version
Sponsor
Sponsor
Sponsor
sponsor
DemonWasp




PostPosted: Wed May 13, 2009 7:13 pm   Post subject: RE:Whats wrong with this picture?

What's that question mark doing there?
Dan




PostPosted: Wed May 13, 2009 7:15 pm   Post subject: RE:Whats wrong with this picture?

There should be no '?' in Pic.FileNew ("World of warcraft.bmp" ?)

Do you get an error or warrning saying illegal picture id? If so it is likey that turing can not find the picture file you are refuring to.

Make sure it is in the same directory as the turing program.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
nonamedude




PostPosted: Wed May 13, 2009 7:28 pm   Post subject: Re: Whats wrong with this picture?

Ok what do u mean the same directory, i just put the program in a folder and then made another folder inside and put the picture in it

Program folder------>Pictures------->World of warcraft

If there should be no Pic.FileNew ("World of warcraft.bmp" ?)
then how should i specify where the pic is?
tjmoore1993




PostPosted: Wed May 13, 2009 7:30 pm   Post subject: RE:Whats wrong with this picture?

The following should be

Turing:

var mypic : int := Pic.FileNew ("World of warcraft.bmp")
Pic.Draw (mypic, maxx div 2, maxy div 2, 0)
tjmoore1993




PostPosted: Wed May 13, 2009 7:32 pm   Post subject: RE:Whats wrong with this picture?

Specifying where a picture is fairly simple. Locate where your picture is either outside or inside your current project folder.

Example

("Picture.bmp") assuming it is in the same folder as the saved project

("C:\\Picture.bmp") assuming it is located in the C drive directory.
DtY




PostPosted: Wed May 13, 2009 7:32 pm   Post subject: RE:Whats wrong with this picture?

You said the image was in the pictures directory, or in the same directory?
nonamedude




PostPosted: Wed May 13, 2009 7:35 pm   Post subject: Re: Whats wrong with this picture?

The picture is in a folder, and the folder is in the folder that the program is in.<----- Hope u get this
Sponsor
Sponsor
Sponsor
sponsor
tjmoore1993




PostPosted: Wed May 13, 2009 7:37 pm   Post subject: RE:Whats wrong with this picture?

I get it fully. Your picture is located in a folder within the project files destination.

Turing:

var mypic : int := Pic.FileNew ("Folder\\World of warcraft.bmp")
Pic.Draw (mypic, maxx div 2, maxy div 2, 0)
nonamedude




PostPosted: Wed May 13, 2009 7:40 pm   Post subject: Re: Whats wrong with this picture?

var mypic : int := Pic.FileNew ("pictures\\World of warcraft.bmp")
Pic.Draw (mypic, maxx div 2, maxy div 2, 0)

An it says file cannot be succesfully created, (If this helps, isaved it as a 24 bit bmp)
tjmoore1993




PostPosted: Wed May 13, 2009 7:43 pm   Post subject: RE:Whats wrong with this picture?

Make sure that everything is spelled as shown for example if it has capitals remember to add them because it is case sensitive.

If you have the problem still take a snapshot of your setup and show us. This will allow us to figure out how you got set up.

Edit*
By the time you figure this out you will laugh and be making things like this


Posted Image, might have been reduced in size. Click Image to view fullscreen.
nonamedude




PostPosted: Wed May 13, 2009 7:53 pm   Post subject: Re: Whats wrong with this picture?

Here is the picture


Snapshot for help.jpg
 Description:
Hope this solves it
 Filesize:  57.56 KB
 Viewed:  79 Time(s)

Snapshot for help.jpg


nonamedude




PostPosted: Wed May 13, 2009 8:00 pm   Post subject: Re: Whats wrong with this picture?

For some reason it is nt displaying it big enough so i'll write what it says EXACTLY what it says

C:\users\owner\documents\Pri\School\culminating\pictures

there cant be a mistake in there, its copy and paste
tjmoore1993




PostPosted: Wed May 13, 2009 8:01 pm   Post subject: RE:Whats wrong with this picture?

I am not sure why it is not popping up. Maybe try removing the spaces in the file name and etc.
BigBear




PostPosted: Wed May 13, 2009 8:09 pm   Post subject: RE:Whats wrong with this picture?

Put them in the same folder and make sure you have the right file extension
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 21 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: