Path: ...!weretis.net!feeder9.news.weretis.net!news.nk.ca!rocksolid2!i2pn2.org!.POSTED!not-for-mail From: fir Newsgroups: comp.lang.c Subject: [pc] new image codec idea considerations Date: Tue, 29 Oct 2024 09:27:19 +0100 Organization: i2pn2 (i2pn.org) Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 29 Oct 2024 08:27:12 -0000 (UTC) Injection-Info: i2pn2.org; logging-data="4167401"; mail-complaints-to="usenet@i2pn2.org"; posting-account="+ydHcGjgSeBt3Wz3WTfKefUptpAWaXduqfw5xdfsuS0"; User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0 SeaMonkey/2.24 X-Spam-Checker-Version: SpamAssassin 4.0.0 Bytes: 2901 Lines: 54 [pc] means programming in c as some still dont know that programing in c belongs to c and thus also could and should be discussed here (it could also be discussed elsewhere but such grups are dead afaik) i got the idea of image codec that compresses more than jotpeg if this is possible..maybe not this what i consider but it is fun to consider anyway the idea is to use maybe such recipe image is a list of points something like struct point {unsigned short x; unsigned short y; unsigned color; }; say 100, 100, 0xff0000 700, 300, 0xffff00 200, 700, 0xffffff and you build the image that for each pixel in image (say 1000x1000 size) you find the closes (in a mean os sqrt(dx*dx+dy*dy)) point on the list and set this pixel to the color of closest pixel this will allow to store some images in an efficient way imo (Probably) each point here has 64 bits/8 bytes of storage and to encode something like polish flag image you need 2 points (16B) i tested how it look if i set randomly soem dose of points like 1000 and render it and it looks like mosaic of random polygons mostly pentagons though probably with dose of quads triangles and hexagons now i think maybe to make simple editor to allow me to set thiose points and drag them by mouse to see if some reasonal images can be build from low dose of points some notes 1) do you think it can be more efective storage than jotpeg? 2) the point size can be changed for examplesomethimes it could be cut down if use les bits for x y and using liek palette for color (also some other bit more elaborate modifications could be used) 3) most probably there could be also used one fiels (liek say not this not much used alpha byte) for denoting how the point could be treated - as points could work differently also for example point could be marked not to chose closest color but the mix making some gradient etc) - imo puting a variety of meaning into thiose point potentially could make the best optimisations for image