Digital Image Processing

HMG Samples and Enhancements

Moderator: Rathinagiri

User avatar
andyglezl
Posts: 1328
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Has thanked: 45 times
Been thanked: 151 times
Contact:

Re: Digital Image Processing

Post by andyglezl »

franco wrote:
Thu Jan 21, 2021 1:03 am
Amazing Andy,
Do you think I could take a 2249 kb jpg and resize to 200 kb and still be clear inside hmg this way to redo my internal camera files before
copying and saving them.
mmm...
Bueno, hice una prueba cargando una imagen de 2,143 KB y la salve con este programa y quedó de 565 KB y me parece buena la resolución.
Pero depende que signifique "buena resolución" para cada uno y el fin que le dará a estás imagenes.
*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
mmm ...
Well, I did a test loading a 2,143 KB image and I saved it with this program and it was 565 KB and the resolution seems good.
But it depends on what "good resolution" means for each one and the purpose that it will give to these images.

prbhmg.JPG
prbhmg.JPG (436.83 KiB) Viewed 1689 times
Andrés González López
Desde Guadalajara, Jalisco. México.

User avatar
AUGE_OHR
Posts: 1309
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 244 times
Been thanked: 373 times

Post by AUGE_OHR »

hi,
franco wrote:
Thu Jan 21, 2021 1:03 am
Do you think I could take a 2249 kb jpg and resize to 200 kb and still be clear inside hmg this way to redo my internal camera files before copying and saving them.
i wonder why you work with CAM instead of Scanner while a CAM have "too much Color"
if you have a Document you need only Black/White so Size of Image is much smaller when compress using JPG.
have fun
Jimmy

franco
Posts: 576
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Been thanked: 34 times

Post by franco »

I need to take pictures with the camera of a Microsoft go 2 tablet.
The electric motor rewind technicians use the tablets to take pictures of different parts of motors while they rebuild.
They just want to hold tablet and take picture nothing else.
I am waiting for sample picture to post to see if a member (Andy) could show me how to resize with a function inside my program after taking picture.
All The Best,
Franco
Canada

User avatar
mol
Posts: 3495
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 289 times
Been thanked: 197 times
Contact:

Post by mol »

the simplest way is to create control IMAGE of requested size, display your picture in this control and save window to a file.
It should be very easy to realize

this is piece of code of Jimmy AUHE_OHR

Code: Select all

   Row    := 0
   Col    := 0
   Width  := BT_ClientAreaWidth("Form_1")
   Height := BT_ClientAreaHeight("Form_1")

   hBitmap := BT_BitmapCaptureClientArea ("Form_1", Row, Col, Width, Height)
   BT_BitmapSaveFile (hBitmap, cFileName, nTypePicture)
   BT_BitmapRelease (hBitmap)
 
look at this topic: viewtopic.php?f=5&t=6744&p=64793&hilit= ... ile#p64793

User avatar
andyglezl
Posts: 1328
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Has thanked: 45 times
Been thanked: 151 times
Contact:

Post by andyglezl »

WOW !
Realmente me sorprendo de lo que podemos plasmar con nuestra imaginación
*--------------------------------------------------------------------------------------------------
Wow
I am really surprised at what we can capture with our imagination

ChicaMarYTorre.jpg
ChicaMarYTorre.jpg (1.06 MiB) Viewed 1643 times
ChicaMarYTorre.jpg
ChicaMarYTorre.jpg (1.06 MiB) Viewed 1643 times
Carboncillo.JPG
Carboncillo.JPG (194.56 KiB) Viewed 1643 times
Face17-OverlayB&WAlpha6.JPG
Face17-OverlayB&WAlpha6.JPG (385.16 KiB) Viewed 1643 times
Tradicional-Moderno.JPG
Tradicional-Moderno.JPG (506.08 KiB) Viewed 1643 times
HojaDeLibro01-ConCara.jpg
HojaDeLibro01-ConCara.jpg (233.4 KiB) Viewed 1638 times
Face11-HandWritingPaintManual.JPG
Face11-HandWritingPaintManual.JPG (238.64 KiB) Viewed 1638 times
Coloreado5.jpg
Coloreado5.jpg (310.21 KiB) Viewed 1604 times
.
.
.
.
Pude utilizar una Tableta y un Lápiz !!! (Solo instalandolo)
*--------------------------------------------------------------------------------------------------
I was able to use a Tablet and a Pencil !!! (Just installing it)
Coloreado6.jpg
Coloreado6.jpg (272.61 KiB) Viewed 1604 times
PruebaTabletaLápiz.jpg
PruebaTabletaLápiz.jpg (896.59 KiB) Viewed 1593 times
TemplateDrawColor.jpg
TemplateDrawColor.jpg (557.55 KiB) Viewed 1569 times
imagen_2021-02-04_093215.png
imagen_2021-02-04_093215.png (1.46 MiB) Viewed 1445 times
imagen_2021-02-05_011339.png
imagen_2021-02-05_011339.png (1.44 MiB) Viewed 1438 times
imagen_2021-02-05_024630.png
imagen_2021-02-05_024630.png (1.28 MiB) Viewed 1438 times
imagen_2021-02-05_150929.png
imagen_2021-02-05_150929.png (1.74 MiB) Viewed 1436 times
Emma_7.JPG
Emma_7.JPG (249.33 KiB) Viewed 744 times
imagen_2021-02-27_085003.png
imagen_2021-02-27_085003.png (1.51 MiB) Viewed 735 times
imagen_2021-02-27_102702.png
imagen_2021-02-27_102702.png (1.47 MiB) Viewed 734 times
imagen_2021-02-27_105823.png
imagen_2021-02-27_105823.png (1012.17 KiB) Viewed 734 times
imagen_2021-02-28_151958.png
imagen_2021-02-28_151958.png (1.54 MiB) Viewed 714 times
imagen_2021-03-01_212343.png
imagen_2021-03-01_212343.png (1.3 MiB) Viewed 687 times
imagen_2021-03-06_215635.png
imagen_2021-03-06_215635.png (1.32 MiB) Viewed 601 times
imagen_2021-03-20_215403.png
imagen_2021-03-20_215403.png (1.45 MiB) Viewed 93 times
imagen_2021-03-20_225155.png
imagen_2021-03-20_225155.png (1.19 MiB) Viewed 93 times
imagen_2021-04-12_230121.png
imagen_2021-04-12_230121.png (1.31 MiB) Viewed 2 times
Attachments
imagen_2021-03-20_210959.png
imagen_2021-03-20_210959.png (1.23 MiB) Viewed 93 times
Last edited by andyglezl on Tue Apr 13, 2021 2:58 pm, edited 19 times in total.
Andrés González López
Desde Guadalajara, Jalisco. México.

franco
Posts: 576
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Been thanked: 34 times

Post by franco »

Holy Cow and WOW,
Thanks to
Andres, Jimmy an Mol
I have this working in a small program. I have shrunk a 3.2mg picture to 652kb. and it is 100% clear for what I need.
I used Mol`s suggestion designed by Jimmy
Amazing and thanks again.
All The Best,
Franco
Canada

User avatar
andyglezl
Posts: 1328
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Has thanked: 45 times
Been thanked: 151 times
Contact:

Post by andyglezl »

andyglezl wrote:
Fri Nov 20, 2020 1:04 am
Hola
Alguien sabe como obtener estos datos de la función GetColor() ?
Matiz, Sat., Lum.
*------------------------------------------------------------------------------
Hi
Does anyone know how to get this data from the GetColor() function ?
Matiz, Sat., Lum.
ColorPicker.jpg
ColorPicker.jpg (237.01 KiB) Viewed 1494 times

Hola
Alguien tendrá una idea de como convertir esto a HMG ?
*-------------------------------------------------------------------
Hi there
Anyone have an idea how to convert this to HMG ?

Code: Select all

//JavaScript + jQuery 2.2.4
function rgbToHsl(r, g, b){
    r /= 255, g /= 255, b /= 255;
    var max = Math.max(r, g, b), min = Math.min(r, g, b);
    var h, s, l = (max + min) / 2;

    if(max == min){
        h = s = 0; // achromatic
    }else{
        var d = (max - min);
        s = l >= 0.5 ? d / (2 - (max + min)) : d / (max + min);
        switch(max){
            case r: h = ((g - b) / d + 0)*60; break;
            case g: h = ((b - r) / d + 2)*60; break;
            case b: h = ((r - g) / d + 4)*60; break;
        }
    }

    return [h, s, l];
}

function returnUsableColor(hsl) {
var str = '';
	str += Math.round(hsl[0]) + ",";
  str += Math.round(hsl[1]*100) + "%,";
  str += Math.round(hsl[2]*100) + "%";
  return str;
}

$('#one').css('background-color', 'rgb(250,206,33)')
var convertRgbToHsl = returnUsableColor(rgbToHsl(250,206,33));
$('#two').css('background-color', 'hsl('+ convertRgbToHsl +')').text(convertRgbToHsl);
Andrés González López
Desde Guadalajara, Jalisco. México.

Post Reply