Page 1 of 1

the mysterious skull painting (code)

Posted: Thu May 31, 2012 11:34 am
by applePi
it is called The Ambassadors:
http://en.wikipedia.org/wiki/The_Ambassadors_(Holbein)
Image
look at the bottom there are something like a plate, but it is a tilted 2D skull with regard to the viewer outside, and if you enter the Ambassador room you can look at the object and see this 2D skull.
i am sure the tilted or rotated objects are related to the matrix math like the OpenGL math. but i find it easier to imagine it as a compressed object (wich may be also have relations to matrices?!!!).
so we can resize the skull image vertically by 5 to see it semi normally.
attached the skull picture before resizing (after rotating it) :
Image
and after resizing:
Image
i have used the image.pb from the pb examples folder to display and resize vertically the image

Code: Select all

UseJPEGImageDecoder()
UseJPEGImageEncoder()

If OpenWindow(0, 0, 0, 640, 480, "Image Resize")

  If CreateImage(0, 416, 304)
    StartDrawing(ImageOutput(0))
    file$= "skull.jpg" 
    LoadImage(0, file$)
    StopDrawing()
  EndIf
  ResizeImage(0, 416, 304)
  CopyImage(0, 1)
  ResizeImage(1, 100, 500)
  
  Repeat
    EventID = WaitWindowEvent()
    If EventID = #PB_Event_Repaint
      StartDrawing(WindowOutput(0))
        DrawImage(ImageID(0), 20, 10)
        DrawImage(ImageID(1), 440, 0)
      StopDrawing()    
    EndIf
  Until EventID = #PB_Event_CloseWindow
  
EndIf

End

Re: the mysterious skull painting (code)

Posted: Thu May 31, 2012 11:53 pm
by akj
I have been experimenting with applePi's program but had a problem as it kept crashing. Below is a extract from my code, just sufficient to show the problem.

Code: Select all

EnableExplicit

Enumeration
  #imgAmbassadors
  #imgClipped
EndEnumeration

Define wclip, hclip

UseJPEGImageDecoder()
LoadImage(#imgAmbassadors, "skull.jpg")
wclip = 330: hclip = wclip/2
GrabImage(#imgAmbassadors, #imgClipped, 112, ImageHeight(#imgAmbassadors)-hclip, wclip, hclip)
StartDrawing(ImageID(#imgClipped))
StopDrawing()
Every time I run this code (with debugger on) it crashes on the StartDrawing() line with the error message "Invalid memory access (read error at address ...)"
I am using Windows 7 and PureBasic 4.61 final. Is this a Windows bug or am I doing something wrong?

Re: the mysterious skull painting (code)

Posted: Fri Jun 01, 2012 2:10 am
by MachineCode
Looking at the painting, is that skull supposed to be hidden or subliminal or something? Because it's so damn obvious what it is, and how out of place it looks. I knew it was a squashed skull even before I read your text, and thought it was something you had just pasted onto the image.

I guess people back then were more easily fooled. :lol:

Re: the mysterious skull painting (code)

Posted: Fri Jun 01, 2012 2:13 am
by idle
as a guess
Result = GrabImage(#Image1, #Image2, x, y, Width, Height)

Code: Select all

EnableExplicit

Enumeration
  #imgAmbassadors
  #imgClipped
EndEnumeration

Define wclip, hclip

UseJPEGImageDecoder()
LoadImage(#imgAmbassadors, "skull.jpg")
wclip = 330: hclip = wclip/2
result = GrabImage(#imgAmbassadors, #imgClipped, 112, ImageHeight(#imgAmbassadors)-hclip, wclip, hclip)
StartDrawing(ImageID(result))
StopDrawing()

Re: the mysterious skull painting (code)

Posted: Fri Jun 01, 2012 6:42 am
by Foz
MachineCode wrote:Looking at the painting, is that skull supposed to be hidden or subliminal or something?
It appears that it was for people who just walk into the room with the people at a very tight angle to the painting, and they would see a normal shaped skull and freak out, until they tried to get a better look at the painting.

Some people call it a mystery.

I call it taking advantage of optical illusions to promote the image further, and get people to look closely at it.

Re: the mysterious skull painting (code)

Posted: Fri Jun 01, 2012 2:48 pm
by netmaestro
As the Wikipedia article reports, one popular view is that the painting was made to be hung in a stairwell, where people climbing the steps with the painting just to their left would be startled by a perfect 3D skull staring at them. Seems as likely an explanation as any. Pretty cool stuff for 1533 though!

@Akj: Should be StartDrawing(Imageoutput( instead of StartDrawing(ImageID(