Its not working because the CardLoadImage command only loads an image from a file and not from the Image Resource library.
eg
@ Card 5, fname loads image from project folder, 1 = scale image
CardLoadImage(5,fname,1)
Note there is also the command CardLoadImageAbs that loads the image from an absolute file path.
The CardLoadImage commands could be bit slow if used when a card loads - I usually do the loading in the MainCode - Startup section - preload the image into an Image Bank slot then use the CardBankImage command to display the image from the image bank onto the card.
The CardLoadImage command was really useful many years ago when computers didn't have much RAM but today holding multiple images in the image bank are both feasible and also display the image very quickly.
The project Books HC shows how to preload the images into a bank and then access them using code similar to that below:-
@ Preload images.
Local okay,numcards,n
ImageBankReset
@ just reserve space for 1 image
ImageBankReserve(1)
@ check if enough memory etc
Put ImageBankSetSizeFN(1,640,480) into okay
If okay=1 Then
ImageBankLoad(1,'wood1.jpg',1)
@ --- Home Card ---
CardBankImage(1,1)
@ --- Template Card 2 ---
CardBankImage(2,1)
@ --- For Player with more data cards ---
Put TotalCardsFN into numcards
If numcards>2 Then
For n=1 To numcards
CardBankImage(n,1)
EndFor
EndIf
EndIf
ADDITION 22.10.16
Regarding your own image situation - with BG.png in Resources\Pictures:-
Local path
Put MyDirectoryFN into path
Append '\Resources\Pictures\BG.png' onto path
CardLoadImage(1,path,1)