ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder
ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Pixelate photo
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Gordon Ham

USA
10 Posts

Posted - Feb 28 2020 :  14:34:17  Show Profile  Reply
I have a 32x32 LED display. I want to pixelate a photo to 32x32. Can It be done? If so, how?

Gordon

Gordon Ham

USA
10 Posts

Posted - Feb 28 2020 :  16:05:59  Show Profile  Reply
I want to add, Once I have 32 pixels, I want access to the RGB of each pixel, so I can send the data to the LED's. It real world, will be more like 64x64. Im thinking its kind of like converting a photo to a 64x64 Icon?
Go to Top of Page

xequte

5345 Posts

Posted - Mar 01 2020 :  23:49:06  Show Profile  Reply
Hi Gordon

It sounds like you should resize the image to 32x32 and then read the pixels.

If it is a large image, scaling to something as small as that may create a blurry mess, so try the following demo to see what gives the best result:

Demos\Display\ZoomFilter\ZoomFilter.dpr

To read the pixels, use:

https://www.imageen.com/help/ImageEn/TIEBitmap.Pixels_ie24RGB.html

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Gordon Ham

USA
10 Posts

Posted - Mar 04 2020 :  11:20:12  Show Profile  Reply
Yes, in most cases it will be very very blurry..but wanting the general outline of a photo. Can everything be done with a simple TImageEn component? Or do I need others? I assume that my photo needs to be perfectly square in pixels, or it wont scale with the right ratio?
Go to Top of Page

Gordon Ham

USA
10 Posts

Posted - Mar 04 2020 :  11:41:37  Show Profile  Reply
I looked at the zoomFilter demo.. Im not wanting to zoom. I want the image area to stay the same.. I just want to change the resolution to be very pixelated 64x64 etc.
Go to Top of Page

xequte

5345 Posts

Posted - Mar 04 2020 :  13:48:21  Show Profile  Reply
Hi

Yes, you can do this with a TImageEnView, or just a TIEBitmap using the Resample method:

ImageEnView1.Proc.Resample( 64, 64, rfNone );

https://www.imageen.com/help/ImageEn/TImageEnProc.Resample.html


When resampling, a Zoom Filter is typically used to improve the quality. That is why you should take a look at the ZoomFilter demo and zoom a large image out to around your desired 64x64 and see which filter works best.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Gordon Ham

USA
10 Posts

Posted - Mar 05 2020 :  12:28:55  Show Profile  Reply
Got it, works great. Thank you
Go to Top of Page

Gordon Ham

USA
10 Posts

Posted - Mar 23 2020 :  13:13:13  Show Profile  Reply
I resized my image fine.. but I really need to show my modified image on a TImage (Image will be sent to a linux machine)
When I show it on a TImage with the stretch property, it uses some sort of interpolation. I want to see the pixelated version, not a smoothed one. If I turn off the AntiAliasing, it doesnt make any difference. Is there something simple Im missing?




Go to Top of Page

xequte

5345 Posts

Posted - Mar 23 2020 :  14:16:19  Show Profile  Reply
Hi

I don't know TImage, but perhaps you could size it to TImage size in ImageEn with the desired pixelation and then display it (1:1)

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To: