Results 1 to 7 of 7

Thread: CGI? How can I publish a image file created on run-time on the Internet?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Posts
    70
    I want to make an exe to be run on the Internet which will read some data from the form and will create a bitmap image. The image on the server is going to be displayed on the client's browser. What should I do, if by any chance someone felt like undestanding what I am talking about?
    Kiziltan Yuceil
    Freelance Web/VB/VBA Programmer
    "It's not what you know it's to whom you consult and with whom you collaborate"

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Firstly, a couple of things to get out of the way.

    1. Make sure that your provider uses NT (fairly unlikely)
    2. If they do use NT, that they have the VB runtimes

    That done, you need to encode the image as either GIF, JPEG, or PNG. Kedaman has some code for JPEGs, and look on PSC for the GIF code.

    Then, send something like this to stdout:
    Code:
    Content-type: image/jpeg
    Content-length: 30000
    
    JFIF..........
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Posts
    70

    More details ?

    What is it i
    Kiziltan Yuceil
    Freelance Web/VB/VBA Programmer
    "It's not what you know it's to whom you consult and with whom you collaborate"

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Posts
    70

    How can I create a picture "object" ?

    I made this bitmap and saved as a seperate file using a form and a picturebox control, but how am I supposed to do this on a console environment such as the Internet? Theoretically, I judge that I have to create a picture object by createobject statement and use its methods to form the image. Which object should that be ? Any other ideas
    Kiziltan Yuceil
    Freelance Web/VB/VBA Programmer
    "It's not what you know it's to whom you consult and with whom you collaborate"

  5. #5
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I can't remember where I got it, but have a look at CGI4VB. However, for CGI programs VB really isn't the best option. You'd find it a lot easier to use C++ and the gd libraries from http://www.boutell.com/gd.

    But...to try and do it in VB anyway, you'd need to do this:
    1. Create the image in your picturebox
    2. Convert to JPEG
    3. Print the headers
    4. Print the image

    Parts 3 and 4 are going to be very hard in VB, since it isn't a console language. You're much better off using a different language. Honestly. I tried using VB for CGI programs a few years ago and decided against it and learnt C++ instead .

    PS: What OS does your hosting provider use?
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Posts
    70

    No problem it's W2K

    It's Windows 2000 it wouldn't cause a problem I suppose..
    Kiziltan Yuceil
    Freelance Web/VB/VBA Programmer
    "It's not what you know it's to whom you consult and with whom you collaborate"

  7. #7
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169

    Win2000 - that's good

    That's a good sign...at least you're not beaten before you start
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width