Create JPEG or GIF
Create JPEG or GIF
Anyone have a JPEG or GIF creator. I need to create simple graphs/line vector input is fine so I can save them and put them into RTF documents that my program creates.
More Info:
I'm building a reporting tool that looks at a lot of data.
I need to graph some of the data and place it into an RTF (Rich Text File) document.
I have already build the RTF creation routines based on other articles.
And I can put JPEG or GIF Files into the RTF output.
.... I just need to build custom JPEGs or GIF files for some simple charting functions.
I'm thinking: (First Thoughts.. Need more thought here...)
#JPEG_Handle.i = JPEG_Create(FName, XSize, YSize ) ; Dots or Resolution... Not sure on this
JPEG_Draw_Line(#JPEG_Handle, Start, Stop, Size, Color) ; Start, Stop and Size would be in # of Dots
Any help would be greatly appreciated..
More Info:
I'm building a reporting tool that looks at a lot of data.
I need to graph some of the data and place it into an RTF (Rich Text File) document.
I have already build the RTF creation routines based on other articles.
And I can put JPEG or GIF Files into the RTF output.
.... I just need to build custom JPEGs or GIF files for some simple charting functions.
I'm thinking: (First Thoughts.. Need more thought here...)
#JPEG_Handle.i = JPEG_Create(FName, XSize, YSize ) ; Dots or Resolution... Not sure on this
JPEG_Draw_Line(#JPEG_Handle, Start, Stop, Size, Color) ; Start, Stop and Size would be in # of Dots
Any help would be greatly appreciated..
Re: Create JPEG or GIF
simple example to the ball rolling, using PB's native JPEG encoder (doesn't have one for GIF though, but search the forum)
Code: Select all
UseJPEGImageEncoder()
If CreateImage(0, 200, 200) And StartDrawing(ImageOutput(0))
LineXY(5, 5, 150, 150, RGB(0,255,0))
StopDrawing()
EndIf
SaveImage(0, "c:\temp.jpg", #PB_ImagePlugin_JPEG)
- netmaestro
- PureBasic Bullfrog
- Posts: 8425
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Re: Create JPEG or GIF
I am probably going to write a GIF image plugin for PureBasic this winter when my work slows down, however in the meantime if you're on Windows you can tap gdiplus to load/save gifs:
http://purebasic.fr/english/viewtopic.php?f=12&t=57041
http://purebasic.fr/english/viewtopic.php?f=12&t=57041
BERESHEIT
Re: Create JPEG or GIF
I know some say GIF is dead but that's far from the truth. People still use them in social media, convert part of a video to gif, Itch.io uses them to display animated screen shots for games, animated forum avatars, etc. It's a bit tiresome to hear people state that old technology is dead all the time. I'm glad to hear that netmaestro might work on this if he finds free time this winter. If not, I'm sure someone will eventually tackle this for PB.
www.posemotion.com
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT
Even the vine knows it surroundings but the man with eyes does not.
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT
Even the vine knows it surroundings but the man with eyes does not.
Re: Create JPEG or GIF
Nice idea.netmaestro wrote:I am probably going to write a GIF image plugin
I looked at the SDK on OSX to see if this would be possible on OSX but the information provided is very limited.
I can get the Check procedure to be called but the Decode or Cleanup procedure is never called.
I have no idea what needs to be set inside the check procedure to make it continue.
Do you know that or maybe Fred can tell ?
Windows (x64)
Raspberry Pi OS (Arm64)
Raspberry Pi OS (Arm64)
Re: Create JPEG or GIF
There's a few ports of https://www.lcdf.org/gifsicle/ that have source code, including OS X. I haven't looked through it myself but may be of help.wilbert wrote:Nice idea.
I looked at the SDK on OSX to see if this would be possible on OSX but the information provided is very limited.
I can get the Check procedure to be called but the Decode or Cleanup procedure is never called.
I have no idea what needs to be set inside the check procedure to make it continue.
Do you know that or maybe Fred can tell ?
www.posemotion.com
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT
Even the vine knows it surroundings but the man with eyes does not.
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT
Even the vine knows it surroundings but the man with eyes does not.
Re: Create JPEG or GIF
It's no problem to decode the image, the problem is understanding the ImagePlugin procedures Fred created.J. Baker wrote:There's a few ports of https://www.lcdf.org/gifsicle/ that have source code, including OS X. I haven't looked through it myself but may be of help.
Windows (x64)
Raspberry Pi OS (Arm64)
Raspberry Pi OS (Arm64)
Re: Create JPEG or GIF
Oh, I see.wilbert wrote: It's no problem to decode the image, the problem is understanding the ImagePlugin procedures Fred created.
www.posemotion.com
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT
Even the vine knows it surroundings but the man with eyes does not.
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT
Even the vine knows it surroundings but the man with eyes does not.
Re: Create JPEG or GIF
I already found it.J. Baker wrote:Oh, I see.wilbert wrote: It's no problem to decode the image, the problem is understanding the ImagePlugin procedures Fred created.
I forgot so init the ID variable
Windows (x64)
Raspberry Pi OS (Arm64)
Raspberry Pi OS (Arm64)
Re: Create JPEG or GIF
You're fast. Glad to hear.wilbert wrote: I already found it.
I forgot so init the ID variable
www.posemotion.com
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT
Even the vine knows it surroundings but the man with eyes does not.
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT
Even the vine knows it surroundings but the man with eyes does not.
Re: Create JPEG or GIF
GIF is dead? No way, it's made a massive comeback in recent months as animations again. Everyone literally knows what a GIF is again. It's not dead at all.J. Baker wrote:I know some say GIF is dead but that's far from the truth.
Re: Create JPEG or GIF
I agree that GIF isnt going anywhere in a hurry (hadnt even heard it was dying)! Just the other month twitter announced they'd raised the size limit of GIFs from 5mb to 15mb http://www.theverge.com/2016/7/11/12154 ... 15mb-files
Re: Create JPEG or GIF
I got it working on OSX to add #PB_ImagePlugin_GIF support for decode.
Code is a mess right now but hopefully I can post something when I clean it up.
Code is a mess right now but hopefully I can post something when I clean it up.
Windows (x64)
Raspberry Pi OS (Arm64)
Raspberry Pi OS (Arm64)
Re: Create JPEG or GIF
Congrats wilbert! That will be a nice feature!wilbert wrote:I got it working on OSX to add #PB_ImagePlugin_GIF support for decode.
Code is a mess right now but hopefully I can post something when I clean it up.
www.posemotion.com
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT
Even the vine knows it surroundings but the man with eyes does not.
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT
Even the vine knows it surroundings but the man with eyes does not.
- Kwai chang caine
- Always Here
- Posts: 5342
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: Create JPEG or GIF
This subject, come, come and come again since a lot of years.
Numerous thread talk about this, this is one of them
http://forums.purebasic.fr/english/view ... 32#p302432
Fred even promise a day he make this plugin they are a lot of time and nothing
Gif have never dead, always is the king of internet, and like you said, now he restart like a new baby for news functions in social network.
Furthermore, several masters have already making great works about gif, NETMAESTRO, TsSoft, Wilbert, ...i use sometime it, for replace fred plugin.
When i see all this jobs, very wonderfull, i not understand the différence between a full plugin and this reader of gif.
Is it very difficult to start from this existing big codes for create this plugin ??? I don't know..
Me too, i'm very happy to read NETMAESTRO create perhaps a real plugin like native pb for jpg, png...
Like this, the nice smilling frog, can dress on red, for Christmas, and give this plugin, so waiting by the community
Numerous thread talk about this, this is one of them
http://forums.purebasic.fr/english/view ... 32#p302432
Fred even promise a day he make this plugin they are a lot of time and nothing
Gif have never dead, always is the king of internet, and like you said, now he restart like a new baby for news functions in social network.
Furthermore, several masters have already making great works about gif, NETMAESTRO, TsSoft, Wilbert, ...i use sometime it, for replace fred plugin.
When i see all this jobs, very wonderfull, i not understand the différence between a full plugin and this reader of gif.
Is it very difficult to start from this existing big codes for create this plugin ??? I don't know..
Me too, i'm very happy to read NETMAESTRO create perhaps a real plugin like native pb for jpg, png...
Like this, the nice smilling frog, can dress on red, for Christmas, and give this plugin, so waiting by the community
The happiness is a road...
Not a destination
Not a destination