Recent

Author Topic: Splitting Picture into Quads using Quadtree ?  (Read 531 times)

Boleeman

  • Hero Member
  • *****
  • Posts: 1158
Splitting Picture into Quads using Quadtree ?
« on: April 06, 2026, 06:58:00 am »
Was wondering if anyone has been able to use Lazarus to visually split a loaded picture into Quads using Quadtree (as shown in attachments) ?

There are plenty of Python and C++ codes, but nothing much in Lazarus (Pascal) or Delphi.

Corpsman had an example of compressing a grayscale bmp image using the Quadtree Algorithm, but I wanted to load a color png and have it dissected into quads using Quadtree.

Here are some nice Python implementations:
https://github.com/AlexEidt/Quart      (this also has a video at the bottom)
https://github.com/fogleman/Quads


But how to go about doing it in Lazarus using TBgrabmp?
« Last Edit: April 06, 2026, 07:38:46 am by Boleeman »

Boleeman

  • Hero Member
  • *****
  • Posts: 1158
Re: Splitting Picture into Quads using Quadtree ?
« Reply #1 on: April 12, 2026, 02:43:50 am »
Here is a Lazarus quadtree program that uses a set of points.

It was made by Corpsman.


Still trying the work out how to do it for loaded coloured png images !

 

TinyPortal © 2005-2018