Computer Science Canada

Whats wrong with this picture?

Author:  nonamedude [ 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

Author:  DemonWasp [ Wed May 13, 2009 7:13 pm ]
Post subject:  RE:Whats wrong with this picture?

What's that question mark doing there?

Author:  Dan [ 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.

Author:  nonamedude [ 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?

Author:  tjmoore1993 [ 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)

Author:  tjmoore1993 [ 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.

Author:  DtY [ 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?

Author:  nonamedude [ 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

Author:  tjmoore1993 [ 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)

Author:  nonamedude [ 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)

Author:  tjmoore1993 [ 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.

Author:  nonamedude [ Wed May 13, 2009 7:53 pm ]
Post subject:  Re: Whats wrong with this picture?

Here is the picture

Author:  nonamedude [ 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

Author:  tjmoore1993 [ 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.

Author:  BigBear [ 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

Author:  tjmoore1993 [ Wed May 13, 2009 8:10 pm ]
Post subject:  Re: RE:Whats wrong with this picture?

BigBear @ Wed May 13, 2009 8:09 pm wrote:
Put them in the same folder and make sure you have the right file extension


You could do that as well. Smile

Author:  nonamedude [ Wed May 13, 2009 8:12 pm ]
Post subject:  Re: Whats wrong with this picture?

Oh yeah i did it,

what i did was just save it all in one folder the picture and the program together instead of putting the pictures in a seperate folder.

Thanks guys and this is the best forum ever (it has the quickest replies)

Author:  nonamedude [ Wed May 13, 2009 8:20 pm ]
Post subject:  Re: Whats wrong with this picture?

Uhmm i know this post was over but i still hav one program.

Make like the text is on the other side

(Image)
---------------------------
---------------------------
(Text) Example
---------------------------
---------------------------

There is a big blank spot on the image, i tried putting picCopy in mode.

Author:  Dusk Eagle [ Wed May 13, 2009 9:55 pm ]
Post subject:  Re: Whats wrong with this picture?

Forgive me if this seems obvious, but is your World of Warcraft picture actually a bitmap, or is it some other picture type? Getting that wrong will mess you up.

Edit: Whoops there's a second page! Looks like you solved your problem now, so that's good Smile . Unfortunately you're going to have to speak in much clearer English if you want your new problem solved.

Author:  tjmoore1993 [ Thu May 14, 2009 6:09 am ]
Post subject:  Re: Whats wrong with this picture?

nonamedude @ Wed May 13, 2009 8:20 pm wrote:
Uhmm i know this post was over but i still hav one program.

Make like the text is on the other side

(Image)
---------------------------
---------------------------
(Text) Example
---------------------------
---------------------------

There is a big blank spot on the image, i tried putting picCopy in mode.


Your problem doesn't show as clearly because the spaces are removed. Anyways to move text around the screen you can use several methods

locate ( , ) % works by column and row
locatexy ( , ) % works by x and y

there are a few others but remember that this will change the next put statement I am sure to where you have set it.

Author:  nonamedude [ Thu May 14, 2009 6:43 pm ]
Post subject:  Re: Whats wrong with this picture?

dont wrry i figured it all out


: