Search found 351 matches

by Cherry
Jul 01, 2017 7:51
Forum: Game Dev
Topic: create program to create bitmap
Replies: 329
Views: 30240

Re: create program to create bitmap

@leopardpm : oh, you are right, I was the fool here. I misunderstood your sentence.
by Cherry
Jun 30, 2017 21:31
Forum: Game Dev
Topic: create program to create bitmap
Replies: 329
Views: 30240

Re: create program to create bitmap

Libraries: Ah I see. I was talking about a in-browser solution though (bookmarklets et al.) where any beginner would just need to copy and paste something into their address bar or bookmark bar (and it would include the "library" in the code blob already), so that shouldn't be an issue. Ba...
by Cherry
Jun 30, 2017 21:09
Forum: Game Dev
Topic: create program to create bitmap
Replies: 329
Views: 30240

Re: create program to create bitmap

@MrSwiss: What is the problem with an external library (and how exactly do you define "external"), if I may ask? lz-string is open source and WTFPL so there are no licensing or maintanence issues whatsoever. But if no compression is required, the encoding itself is simple to write from scr...
by Cherry
Jun 30, 2017 20:09
Forum: Game Dev
Topic: create program to create bitmap
Replies: 329
Views: 30240

Re: create program to create bitmap

@leopardpm: To make sure we talk about the same things, the forum counts characters and not bytes and while a byte is 8 bits wide and therefore can have only 256 values, a (Unicode) character can have more than that. So I meant you could effectively use 15 bits per character , which means storing so...
by Cherry
Jun 30, 2017 19:38
Forum: Game Dev
Topic: create program to create bitmap
Replies: 329
Views: 30240

Re: create program to create bitmap

Why out of scope? Not everybody interested in FreeBasic has always access to a FB compiler when reading a forum. As I said, simplest example: your phone. And don't forget that the "Game Dev" section has content which is also interesting for people not related to FB at all, same for the &qu...
by Cherry
Jun 30, 2017 19:09
Forum: Game Dev
Topic: create program to create bitmap
Replies: 329
Views: 30240

Re: create program to create bitmap

OK in that case your current algorithm has an expansion factor of ~122%. That means that base64 (at 133% expansion) produces output which is around 10% larger than yours. (Which I think is minor, though.)
by Cherry
Jun 30, 2017 18:58
Forum: Game Dev
Topic: create program to create bitmap
Replies: 329
Views: 30240

Re: create program to create bitmap

@leopardpm: No, it's true that base64 by definition reduces the efficency because it requires more storage than unencoded data by a factor of 133%, i.e. a 3000 bytes file would need 4000 characters to encode (plus a few "header" bytes). @MrSwiss: If I read how this thread started, I believ...
by Cherry
Jun 30, 2017 18:27
Forum: Game Dev
Topic: create program to create bitmap
Replies: 329
Views: 30240

Re: create program to create bitmap

@leopardpm: No I'm not hosting it, the forum is hosting it. It is just sent to this service and returned as regular HTTP response body in order to work around the forum issue I mentioned, whenever the browser displays it. (It is true that I or whoever runs such a service could therefore know everyth...
by Cherry
Jun 30, 2017 17:07
Forum: Game Dev
Topic: create program to create bitmap
Replies: 329
Views: 30240

Re: create program to create bitmap

An example of what I imagined: Link: Click me Inline image: http://dataurl.app.dotlabs.co/data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCg...
by Cherry
Jun 30, 2017 16:15
Forum: Game Dev
Topic: create program to create bitmap
Replies: 329
Views: 30240

Re: create program to create bitmap

Actually, if the board's filter would allow things starting with "data:" to be treated as link or image source, it would be even nicer. Using base64, it is "data:" + mimetype + ";base64," + base64-encoded contents of the file. (There is also a "raw" way.) Ther...
by Cherry
Jun 30, 2017 15:58
Forum: Game Dev
Topic: create program to create bitmap
Replies: 329
Views: 30240

Re: create program to create bitmap

https://en.wikipedia.org/wiki/Data_URI_scheme data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAEAAQADASIAAhE...
by Cherry
Jun 30, 2017 11:31
Forum: Game Dev
Topic: create program to create bitmap
Replies: 329
Views: 30240

Re: create program to create bitmap

Excuse my ignorance, but what is the benefit of using such a complicated method compared to simply uploading an image file (preferrably PNG - lossless compression) somewhere and posting it, or in case it's about the understandable fear of hosters going down and links becoming dead, posting a base64 ...
by Cherry
May 31, 2017 10:08
Forum: Projects
Topic: GRD for Freebasic (Windows only)
Replies: 4
Views: 1295

Re: GRD for Freebasic (Windows only)

Hi, I found another issue: You are using "GetModuleHandle(NULL)" in your "GRD_Int" code to get the current hInstance. However, this wrong because your code may be used in a DLL (that's what I'm doing for example). In this case it will go haywire as soon as more than one DLL (or t...
by Cherry
May 28, 2017 8:38
Forum: Projects
Topic: GRD for Freebasic (Windows only)
Replies: 4
Views: 1295

Re: GRD for Freebasic (Windows only)

Very nice, however scrolling is behaving erratically when a device is used which has fine-grained scroll control, e.g. a touchpad or a trackpoint. It would keep scrolling down most of the time, even when trying to scroll up. This is because your WM_MOUSEWHEEL handler considers only a delta of exactl...
by Cherry
Mar 29, 2017 14:27
Forum: Tips and Tricks
Topic: A possible trick for files with fixed length records
Replies: 8
Views: 1050

Re: A possible trick for files with fixed length records

What are you guys talking about? I don't get it :-/

First I thought it's about a programming trick (which I didn't really understand either), then it sounded like a forum trick, but I don't see which one because when I copy the snippets here I get what I expected to get!

Go to advanced search