FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Image-convert, crop and resize ( full source included )
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Image-convert, crop and resize ( full source included )
Posted: Fri Aug 26, 2011 09:30 PM
Hello,

a Part of my Image-converter, to include in Your Application
Format-convert, Crop and Resize.
Full Souce is included :

Download ( 3.4 MB ) :
http://www.pflegeplus.com/fw_downloads/imgcrop1.zip

The Dialogs ( Convert, Resize and Crop ) don't need any Exit/close-buttons.
Open Dialogs are closed automatically, as soon a Button is selected !!!.

Select a Image from subdirectory /Images/???



Available format from FREEIMAGE

BMP Windows or OS/2 Bitmap File (*.BMP)
DDS DirectDraw Surface (*.DDS)
FAXG3 Raw Fax format CCITT G3 (*.G3)
GIF Graphics Interchange Format (*.GIF)
ICO Windows Icon (*.ICO)
IFF Amiga IFF (*.IFF, *.LBM)
JNG JPEG Network Graphics (*.JNG)
JPEG Independent JPEG Group (*.JPG, *.JIF, *.JPEG, *.JPE)
KOALA Commodore 64 Koala format (*.KOA)
MNG MNG
PBM Portable Bitmap (ASCII) (*.PBM)
PBMRAW Portable Bitmap (BINARY) (*.PBM)
PCD Kodak PhotoCD (*.PCD)
PCX Zsoft Paintbrush PCX bitmap format (*.PCX)
PGM Portable Graymap (ASCII) (*.PGM)
PGMRAW Portable Graymap (BINARY) (*.PGM)
PNG Portable Network Graphics (*.PNG)
PPM Portable Pixelmap (ASCII) (*.PPM)
PPMRAW Portable Pixelmap (BINARY) (*.PPM)
PSD Adobe Photoshop (*.PSD)
RAS Sun Rasterfile (*.RAS)
SGI Silicon Graphics SGI image format (*.SGI)
TARGA Truevision Targa files (*.TGA, *.TARGA)
TIFF Tagged Image File Format (*.TIF, *.TIFF)
WBMP Wireless Bitmap (*.WBMP)
XBM X11 Bitmap Format (*.XBM)
XPM X11 Pixmap Format (*.XPM)



Resize horizontal, vertical or percent :



Click Top/Left and Bottom/Right to Crop a Image-area



From a Dialog, You can export to a defined Directory
View the created Script, restore to Original or View the Result



Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 2170
Joined: Fri Jul 18, 2008 01:24 AM
Re: Image-convert, crop and resize ( full source included )
Posted: Fri Aug 26, 2011 10:40 PM

Uwe, thanks.
Regards.

Francisco J. Alegría P.

Chinandega, Nicaragua.



Fwxh-MySql-TMySql
Posts: 883
Joined: Thu Dec 24, 2009 12:46 AM
Re: Image-convert, crop and resize ( full source included )
Posted: Sat Aug 27, 2011 01:44 AM

Thanks Uwe!!!

=====>

Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Image-convert, crop and resize ( full source included )
Posted: Sat Aug 27, 2011 10:52 AM
Thank You very much for the response.
I hope it will be useful.

Here is a multimedia-help for the Tool :

Download :
http://www.pflegeplus.com/fw_downloads/help1.zip



Maybe You still need some more Scripts ?
It is easy to include more Filters.



Flip and Rotate
-------------------
cScript1 := '-quiet -o ' + cNewfile + ' -rotate_flag smooth -rotate 90 -overwrite ' + cOrgfile
cScript1 := '-quiet -o ' + cNewfile + ' -rotate_flag smooth -rotate 180 -overwrite ' + cOrgfile
cScript1 := '-quiet -o ' + cNewfile + ' -rotate_flag smooth -rotate 270 -overwrite ' + cOrgfile
cScript1 := '-quiet -o ' + cNewfile + ' -rotate_flag smooth -yflip -overwrite ' + cOrgfile
cScript1 := '-quiet -o ' + cNewfile + ' -rotate_flag smooth -xflip -overwrite ' + cOrgfile


Sharpen
---------
// nSharpen = %
cScript2 := '-quiet -o ' + cNewFile + ' -sharpen ' + ALLTRIM(STR(nSharpen)) + ' -overwrite ' + cOrgfile


Contrast
----------
// nContrast = %
cScript3 := '-quiet -o ' + cNewFile + ' -contrast ' + ALLTRIM(STR(nContrast)) + ' -overwrite ' + cOrgfile


Lens-effect
--------------
// nLens = % of Image ( 100 % = Circle fills complete )
cScript4 := '-quiet -o ' + cNewFile + ' -lens ' + ALLTRIM(STR(nLens)) + ' -overwrite ' + cOrgfile


Adding Watermark
----------------------
// cWBitmapL = Watermakfile
// nWLeft = Left
// nWTop = Top
// nWTransp = transparent-level

cScript5 := '-quiet -o ' + cNewFile + ' -wmfile ' + cWBitmapL + ' -wmpos ' + ALLTRIM(STR(nWLeft)) + ' ' + ALLTRIM(STR(nWTop)) + ' -wmopacity ' + ALLTRIM(STR(nWTransp)) + ' -overwrite ' + cOrgfile


Brightness
--------------
// -% = darker, +% = lighter
cScript6 := '-quiet -o ' + cNewFile + ' -brightness ' + ALLTRIM(STR(nBright)) + ' -overwrite ' + cOrgfile


Emboss-effect
-----------------
cScript7 := '-quiet -o ' + cNewFile + ' -emboss -overwrite ' + cOrgfile


Convert to Grey
-------------------
cScript8 := '-quiet -o ' + cNewFile + ' -grey ' + ALLTRIM(STR(nGray)) + ' -overwrite ' + cOrgfile


Mosaic-effect
-----------------
// nMosaic = %
cScript9 := '-quiet -o ' + cNewFile + ' -mosaic ' + ALLTRIM(STR(nMosaic)) + ' -overwrite ' + cOrgfile


Swirl-effect
-----------------
// nSwirl = %
cScript10 := '-quiet -o ' + cNewFile + ' -swirl ' + ALLTRIM(STR(nSwirl)) + ' -overwrite ' + cOrgfile


Best Regards
uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 625
Joined: Wed Mar 14, 2007 06:49 PM
Re: Image-convert, crop and resize ( full source included )
Posted: Sat Aug 24, 2013 03:39 AM

Greetings Uwe:

Excellent work i had been very useful, I liked about the entire help file, but i have a question: how can you that the images will take effect for passing from one to another?

I am working with images and i would like them to go aquick

Thanks.. :lol: :lol:

Soluciones y Diseño de Software
Damos Soluciones...

I.S.C. Victor Daniel Cuatecatl Leon
Director y Diseñador de Proyectos

http://www.soldisoft.unlugar.com
http://www.sisa.unlugar.com
danyleon82@hotmail.com
www.facebook.com/victordaniel.cuatecatlleon
Posts: 625
Joined: Wed Mar 14, 2007 06:49 PM
Re: Image-convert, crop and resize ( full source included )
Posted: Wed Aug 28, 2013 12:34 AM

Up +1 :oops: :oops: :cry:

Soluciones y Diseño de Software
Damos Soluciones...

I.S.C. Victor Daniel Cuatecatl Leon
Director y Diseñador de Proyectos

http://www.soldisoft.unlugar.com
http://www.sisa.unlugar.com
danyleon82@hotmail.com
www.facebook.com/victordaniel.cuatecatlleon
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: Image-convert, crop and resize ( full source included )
Posted: Wed Aug 28, 2013 05:01 AM

Uwe:

Like always, superb job !

Posts: 625
Joined: Wed Mar 14, 2007 06:49 PM
Re: Image-convert, crop and resize ( full source included )
Posted: Wed Aug 28, 2013 01:05 PM

Good Day Forum:

I found that with the example in made, unfortunately is not built with Fivewin, is an independent image editor:
Multimedia Builder 4.9.8.13, is very interesant and interactive..

Greetings. :oops: :oops:

Soluciones y Diseño de Software
Damos Soluciones...

I.S.C. Victor Daniel Cuatecatl Leon
Director y Diseñador de Proyectos

http://www.soldisoft.unlugar.com
http://www.sisa.unlugar.com
danyleon82@hotmail.com
www.facebook.com/victordaniel.cuatecatlleon
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Image-convert, crop and resize ( full source included )
Posted: Wed Aug 28, 2013 02:01 PM

VERY GOOD!!!

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Image-convert, crop and resize ( full source included )
Posted: Wed Sep 18, 2013 09:27 AM

Uwe ,
where is the source code of help1.exe ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Image-convert, crop and resize ( full source included )
Posted: Wed Sep 18, 2013 10:42 AM
Silvio,
Help-files, I'm creating with a external Multimedia Builder.
http://www.mediachance.com/mmb/
A compiler is included, to create a stand-alone EXE-file.
Many multimedia-effect are possible.

Víctor posted =>
I found that with the example in made, unfortunately is not built with Fivewin, is an independent image editor:
Multimedia Builder 4.9.8.13, is very interesant and interactive..


Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.

Continue the discussion