[Implemented] JPG Image Display

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Andre.

I also vote for built-in JPG support (Image and Gadget libraries)

Regards
André

*** German PureBasic Support ***
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by El_Choni.

Hi,

@ebs: the problem seemed to be calling UpdateImage() from the window procedure. Moved the code with CallCOM to the #WM_PAINT message processing, and it seemed to be fine, but other problems arised: the image was showed a millisecond, and then turned black, or showed but disappeared when moving the window, to appear again if moved the window offscreen and then in again; I'm a bit lost, I'm new to window procedures. Sorry, I'll keep trying...

Bye,

El_Choni
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by naw.

Hi, How about PNG support?
Obviously there are issues around GIF licencing so thats out...
PNG I believe doesnt require a licence and offers the transparency of GIFs and the compression of JPG.
(BTW - amazing code example above - wish I understood it :wink:

- A suggestion/workaround: I've been using the webgadget to display images like gifs / jpgs, even vrml and pdf files, I know it's not *nice* but well it does work :wink:
- from memory try something like:

~~~~~~~~~~~~~~~~~~~~~~~~

procedure writeimage(gid,x,y,w,h,file$)
webgadget(gid,x,y,w,h)
setgadgettext("javascript:document.write('');document.close()")
endprocedure

~~~~~~~~~~~~~~~~~~~~~~~~




Edited by - naw on 05 July 2002 11:04:52
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by El_Choni.

That is a good trick! You only have to know JavaScript XD!

If someone is interested in coding a lib or porting it to PB, I've heard there's a PNGlib with source somewhere.

Bye,

El_Choni
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Danilo.

>Obviously there are issues around GIF licencing so thats out...

You dont use any GIF code here, but WinAPI only -
so Microsoft should pay the GIF license.

cya,
...Danilo

(registered PureBasic user)
Post Reply