Hi everyone,
I'm trying to set up a macro in open office that does some basic changes to photos.
Basically i need it to
up contrast by 25%
up brightness 25%
lower gamma to 0.7
apply border
apply wrap though
and i would like to have this as a button in the picture menu(or a keyboard short cut)
I have tried the recording feature, but it doesn't work when I run the macro, my programing knowledge is very basic but it doesn't even look like it records anything.
[Solved] Picture Macro
[Solved] Picture Macro
Last edited by mazman on Wed Nov 10, 2010 12:50 am, edited 1 time in total.
Open Office 3.2.1
Windows 7
Windows 7
Re: Picture Macro
The OpenOffice.org not a picture editing tool. You need use a real picture editor for change contrast, brightness, gamma of a picture. Try it with GIMP or other opensource (or commercial) software before you insert the picture into an OpenOffice document.Basically i need it to
up contrast by 25%
up brightness 25%
lower gamma to 0.7
apply border
apply wrap though
(In my opinion the modify the border of a picture (or pictures) maybe is possible in OpenOffice by basic macro)
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Picture Macro
I do not know what kind of border you want to set to the image, change the border according to your desired one.
Code: Select all
Sub ChangeImageAttribute
oDoc = ThisComponent
oSelected = oDoc.getCurrentSelection()
If oSelected.supportsService("com.sun.star.text.TextGraphicObject") Then
aBorder = CreateUnoStruct("com.sun.star.table.BorderLine")
With aBorder
.OuterLineWidth = 2
End With
With oSelected
.AdjustContrast = 25
.AdjustLuminance = 25
.Gamma = 0.7
.BorderDistance = 49
.LeftBorder = aBorder
.TopBorder = aBorder
.RightBorder = aBorder
.BottomBorder = aBorder
.Surround = com.sun.star.text.WrapTextMode.THROUGHT
.TextWrap = com.sun.star.text.WrapTextMode.THROUGHT
End With
End If
End Sub
Please, edit this thread's initial post and add "[Solved]" to the subject line if your problem has been solved.
Apache OpenOffice 4-dev on Xubuntu 14.04
Apache OpenOffice 4-dev on Xubuntu 14.04
Re: Picture Macro
wow!
I learned something again.
I learned something again.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Picture Macro
your a champion! even picked the border that i use!
thanks a million
thanks a million
Open Office 3.2.1
Windows 7
Windows 7