It is currently Tue Jun 27, 2017 10:33 pm



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Quality Parameter for Jpeg Saving
Unread postPosted: Tue May 09, 2017 1:17 am 
Offline
User avatar

Joined: Wed Jul 10, 2013 8:11 am
Posts: 359
Hadutke found a missing description about Jpeg quality.
Quote:
Gr.bitmap.save <bitmap_ptr_nvar>, <filename_sexp>{, <quality_nexp>}


<quality_nexp>
The possible range is from 0 to 100.
Default is 50.

Gregor


Top
 Profile  
 
 Post subject: Re: Quality Parameter for Jpeg Saving
Unread postPosted: Tue May 09, 2017 2:25 am 
Offline

Joined: Tue Dec 04, 2012 10:50 am
Posts: 659
Location: UK
aFox wrote:
Hadutke found a missing description about Jpeg quality.
Quote:
Gr.bitmap.save <bitmap_ptr_nvar>, <filename_sexp>{, <quality_nexp>}


<quality_nexp>
The possible range is from 0 to 100.
Default is 50.

Gregor

I wonder what zero quality would mean... Not worth doing?

Mike.


Top
 Profile  
 
 Post subject: Re: Quality Parameter for Jpeg Saving
Unread postPosted: Tue May 09, 2017 3:23 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 5:19 am
Posts: 596
Location: Netherlands
Hi Mike,

Quote:
I wonder what zero quality would mean... Not worth doing?

In Dutch we say "that was a shot in front of an open goal", hope you'll understand......

I loaded the board from my latest game (a .png) and saved it as a .jpg with quality 0......
Code:
GR.BITMAP.LOAD Bg,DataPath$+"Board.png"
GR.BITMAP.SAVE Bg,DataPath$+"Board.jpg",0

Have a look at the difference:
ImageImage

I guess the discrete cosine transfer function, used for compressing a jpg, has a minimum setting which is still more or less acceptable: The zero quality used in RFO-Basic.
If you want to see some really dramatic image deterioration try the following:
Load a simple small picture and save it as a jpg with any quality setting, e.g 50. Load the newly saved picture and save it again (same setting).
Look at the pic and repeat the process a number of times.
You will soon see the DCT treats more and more colors on a par....... :evil:
This is why I avoid jpg as much as possible!

Have fun,

Aat

[EDIT].....hope this is not too much off-topic....

_________________
To view all my Apps in the BASIC! repository: http://laughton.com/basic/programs/Author_Index/Aat.pdf

When Sod's Law equals Murphy's Law you are bound to be on the right track....!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
suspicion-preferred