Board index » delphi » Winsock programming, simple display of gif&jpg

Winsock programming, simple display of gif&jpg

Two burning questions are often presented in this group, but never
were they answered in a satisfactory manner. Perhaps it is just too
difficult, or  maybe this knowledge is considered too valuable to
share on a public forum.
Such reasons , I could understand. However please be honest, so
confusion can be avoided in the future.

How can I make a program which performs a simple telnet- or
ftp-session,  using the winsock.dll ? Is there somebody, who has such
a program, and does he/she/they want to share the source code?
Of course, I know of the pasock unit. However, it is not simple to
figure out how to make a telnet application with it. The example is a
finger program only. Perhaps I am an unusual person, but I am not very
interested in doing finger or ping.
I could order some books, study a couple of weeks, and sure I could
figure it out. Unfortunately, that time is unavailable to me. In that
sense, it is very presumptious of me, to ask somebody else to share
his efforts for nothing more than gratitude.  However, I thought the
whole point of having a newsgroup like this, is to avoid  duplication
of efforts.

The same applies to the questions about a gif/jpeg viewer. This
question has  been posted countless times, the answer though has
escaped me. Just a simple piece of source code that can put the
picture on the screen, is it so  complicated ?

Let me be clear once more : Do not answer with "look at homepage
XXX",or  "look in the XXX archive" that answer has been misused too
many times. Just the source code, please.
I realize somebody had to spend a lot of sweat for it, but I am sure
many readers of this group will be eternally greatful for your
sacrifice.

Many thanks in advance,

Antonie  Baars  

 

Re:Winsock programming, simple display of gif&jpg


Quote
d950...@icpc00.icpc.fukui-u.ac.jp (A.Baars) wrote:
>Two burning questions are often presented in this group, but never
>were they answered in a satisfactory manner. Perhaps it is just too
>difficult, or  maybe this knowledge is considered too valuable to
>share on a public forum.
>Such reasons , I could understand. However please be honest, so
>confusion can be avoided in the future.
>How can I make a program which performs a simple telnet- or
>ftp-session,  using the winsock.dll ? Is there somebody, who has such
>a program, and does he/she/they want to share the source code?

Are you kidding? What do you mean simple? Did you read at least RFC?
It's PROTOCOL and implementation of protocol usually is the most
difficult thing (OK, OK it depends on protocol of course). Did you
ever try to write the simpliest protocol? Xmodem or ZModem?
Telnet is not just send char/receive char. Using of Winsock is easy:
create socket, connect, recv, send, close (with some variations of
course). I'm writing SMTP host now (minimal implementation - only
basic functions) but exe is 45K already - and mainly it's protocol.
(BTW - 118K of sources).

Quote
>The same applies to the questions about a gif/jpeg viewer. This
>question has  been posted countless times, the answer though has
>escaped me. Just a simple piece of source code that can put the
>picture on the screen, is it so  complicated ?

Fine, just tell me - you want it to be put on DOS screen or Windows
screen? What type of GIF's and JPEG's you want to support? (Please
don't hesitate to add extra questions - I'm not the specialist in
graphics).

Simple piece of code? If it's so simple - write it, it shouldn't take
too much time.

Quote
>Let me be clear once more : Do not answer with "look at homepage
>XXX",or  "look in the XXX archive" that answer has been misused too
>many times. Just the source code, please.
>I realize somebody had to spend a lot of sweat for it, but I am sure
>many readers of this group will be eternally greatful for your
>sacrifice.
>Many thanks in advance,

You are welcome...

Quote
>Antonie  Baars  

Cheers
  Dmitri

--------------------------------------------------------------
        Shit happens, but why it always happens to us?
--------------------------------------------------------------
Dmitri Poujlivyi            mailto:  dmi...@god.bel.alcatel.be
                            http://www.dma.be/p/bewoner/dmitri

Re:Winsock programming, simple display of gif&jpg


In article <4qnj3t$...@icpc02.icpc.fukui-u.ac.jp>,
d950...@icpc00.icpc.fukui-u.ac.jp says...

Quote

>Two burning questions are often presented in this group, but never
>were they answered in a satisfactory manner. Perhaps it is just too
>difficult, or  maybe this knowledge is considered too valuable to
>share on a public forum.
>Such reasons , I could understand. However please be honest, so
>confusion can be avoided in the future.

>How can I make a program which performs a simple telnet- or
>ftp-session,  using the winsock.dll ? Is there somebody, who has such
>a program, and does he/she/they want to share the source code?
>Of course, I know of the pasock unit. However, it is not simple to
>figure out how to make a telnet application with it. The example is a
>finger program only. Perhaps I am an unusual person, but I am not very
>interested in doing finger or ping.
>I could order some books, study a couple of weeks, and sure I could
>figure it out. Unfortunately, that time is unavailable to me. In that
>sense, it is very presumptious of me, to ask somebody else to share
>his efforts for nothing more than gratitude.  However, I thought the
>whole point of having a newsgroup like this, is to avoid  duplication
>of efforts.

I doubt a couple of weeks would get you thru the protocol definitions
for FTP and others let alone put pen to paper and design the programs.
Writing winsock apps is easy, just use open/close and read/write dll
calls (see Winsock.hlp from Microsoft). If all you want to do is write
an FTP program, save yourself the time and energy, use any one of the
free FTP clients readily available.

Quote

>The same applies to the questions about a gif/jpeg viewer. This
>question has  been posted countless times, the answer though has
>escaped me. Just a simple piece of source code that can put the
>picture on the screen, is it so  complicated ?

Just a simple piece code? Have you ever written a graphics application
for windows?  the specifications for Gif and Jpg are freely available,
but once again are lengthy and complex. Why not just use Lview31 or
jview386?

- Show quoted text -

Quote

>Let me be clear once more : Do not answer with "look at homepage
>XXX",or  "look in the XXX archive" that answer has been misused too
>many times. Just the source code, please.
>I realize somebody had to spend a lot of sweat for it, but I am sure
>many readers of this group will be eternally greatful for your
>sacrifice.

>Many thanks in advance,

>Antonie  Baars  

Re:Winsock programming, simple display of gif&jpg


Quote
d950...@icpc00.icpc.fukui-u.ac.jp (A.Baars) wrote:
>Let me be clear once more : Do not answer with "look at homepage
>XXX",or  "look in the XXX archive" that answer has been misused too
>many times. Just the source code, please.

The answer is used quite rightly.  People don't want to{*word*222}with
posting code in here unless they have to...they just reference a place
where YOU can find it.  Now if you're too lazy to go get it, then you
obviously don't want the code bad enough.

I think we have one of those "I don't read no s{*word*249}kin' faqs" persons
on our hands...

Re:Winsock programming, simple display of gif&jpg


Hi there,

Quote
A.Baars wrote:

> The same applies to the questions about a gif/jpeg viewer. This
> question has  been posted countless times, the answer though has
> escaped me. Just a simple piece of source code that can put the
> picture on the screen, is it so  complicated ?

> Many thanks in advance,

> Antonie  Baars

Tuh, some people are never satisfied... :-)

Okay, I agree with your points, but I have no source code on me, so
you'll probably be a tad disapointed by my responce. I don't know about
the first part, I've downloaded pasock, but haven't had time to try it.

About the GIFs an jpegs though...

I'm writing a GIF library (which should be finished in about a week or
so) and which not being unbelievably hard to write, it's been time
consuming, and has involved quite a bit of research. I don't plan on
giving the source away! I had the idea of releasing as freeware a
version of the TPU which would load a single GIF images, which would be
fine for most people, and for a small fee (any ideas on how small or
large to my address!) I would be willing to give the source for a full
version which would load GIF files which contain multiple images and the
comment blocks etc. It's nice to get free code (I *love* to get source
code), but there are two sides to every agrument. I do give away quite a
bit of code for free, and this will be my first attempt at making some
money off something I've done, but I feel the time and effort I'm
putting in justify my doing so.

Sorry, I didn't mean for this to turn into a soapbox for me to preach
from, but there you go.

As for jpegs, (again no source beacause I haven't tried it myself yet,
but seeing as I'm here anyway), a quick way would be what most mac
people do, and use the quick time extensions (only you use the windows
extensions!).

Oh, and I have a sneaking suspition that you're trying to write a web
browser (winsock, gif & jpg all esentials for a web browser), in which
case I wish you luck. I'm still halfway thru writting mine (hence my
writiing a GIF library).

--

TTFN and TC, Michael Dales, official nice person.
----------------------------------------------------------------------------
Home page editor for    email : 94021...@udcf.gla.ac.uk
Glasgow University      voice : 0141-776 5789
HTML Association        snail : 97 Iona Way, Kirkintilloch,
(WebSoc).                       Glasgow, G66 3PU.
So there.               URL   :
http://www.gla.ac.uk/Clubs/WebSoc/~9402198d/
----------------------------------------------------------------------------

Re:Winsock programming, simple display of gif&jpg


Quote
ggr...@2sprint.net (Valtar) wrote:
>d950...@icpc00.icpc.fukui-u.ac.jp (A.Baars) wrote:
>>Let me be clear once more : Do not answer with "look at homepage
>>XXX",or  "look in the XXX archive" that answer has been misused too
>>many times. Just the source code, please.
>The answer is used quite rightly.  People don't want to{*word*222}with
>posting code in here unless they have to...they just reference a place
>where YOU can find it.  Now if you're too lazy to go get it, then you
>obviously don't want the code bad enough.
>I think we have one of those "I don't read no s{*word*249}kin' faqs" persons
>on our hands...

Don't be like that, it serves no purpose. True, my post was in a
somewhat provocative style, but  with reason. I've been following up
on adviced links for months now. However, none of the libraries I've
checked out, could fulfill the original promish. It seems that  the
answer :" look at XXX /YYY " is given without them actually knowing
what they refer to. I spoke with other people who encountered the same
problem.
About beeing  lazy:.  It seem to make perfect sense to me that you
save your energy for problems which are not have been solved yet. If
you mean that one should pay for the efforts of other people, OK, I
can understand that argument. In that case SAY SO, than we know how
things stand, in stead of confusing the issue by suggesting that there
is free source code available somehere in the public domain.

To do justice to some libraries, I've checked out : They seem very
valuable and interesting. However, they are currently in a very basic
and rough shape. It will take a large effort of a average user to
implement it in his programs. Unless you have an unlimited supply of
time, they are not accesible for the larger number of users. This is
indeed a pity, since pictures and netwerktransfer are two of the most
interesting items. I know many people are looking in this direction,
just look to the number of questions in this newsgroup.
Cheers
A.Baars

Re:Winsock programming, simple display of gif&jpg


Quote
Michael Dales <94021...@udcf.gla.ac.uk> wrote:
>I'm writing a GIF library (which should be finished in about a week or
>so) and which not being unbelievably hard to write, it's been time
>consuming, and has involved quite a bit of research. I don't plan on
>giving the source away! I had the idea of releasing as freeware a
>version of the TPU which would load a single GIF images, which would be
>fine for most people, and for a small fee (any ideas on how small or
>large to my address!) I would be willing to give the source for a full
>version which would load GIF files which contain multiple images and the
>comment blocks etc. It's nice to get free code (I *love* to get source
>code), but there are two sides to every agrument. I do give away quite a
>bit of code for free, and this will be my first attempt at making some
>money off something I've done, but I feel the time and effort I'm
>putting in justify my doing so.

Thank you for your positive reply. I think it is a good idea to
develop Gif software. There is a real market for it. The problem is to
get money for something which, as many people believe, is freely
available on the net. It is not of course, as we know. To make your
product more attractive, you might consider to include also Jpeg
support. However, this would increase the project considerably. The
key factor will be the convenience to the user. It would be a good
idea to make the commands similar to the Windows BMP palet/bitblt
syntax (if possible). I am expecting (hoping) that Microsoft will
include gif/jpg support in it's new windows versions, so you should be
fast with your release.

Quote
>Oh, and I have a sneaking suspition that you're trying to write a web
>browser (winsock, gif & jpg all esentials for a web browser), in which
>case I wish you luck. I'm still halfway thru writting mine (hence my
>writiing a GIF library).

I saw on your homepage that you are writing a netbrowser. I'am not,
sorry, I just want to use these techniques to make my daily work more
convenient and pleasant.
I wish you luck with your project, and I would be very interested in
your gif viewer. If you would like my opinion, please feel free to
mail me.
A.Baars

Other Threads