是否有通过 VBA 更改图片清晰度的功能

Is there a function to change the sharpness of a Picture via VBA

我拍了很多照片。对于所有这些图片,我想用宏来改变对比度、亮度和清晰度。

使用我当前的代码,我已经可以将对比度和亮度更改为我选择的值。我的问题是我没有 know/find 更改图片清晰度的命令?

我试着用这个猜测命令:.IncrementSharpness 0.1 但我猜这不起作用。

For n = 1 To 3
  Set myDocument = ActivePresentation.Slides(z)
  With myDocument.Shapes(1).PictureFormat
    .CropBottom = 285    
    .CropLeft = 170    
    .CropRight = 225    
    .CropTop = 250    
    .IncrementContrast 0.3    
    .IncrementBrightness 0.1    
  End With
  z = z + 1
Next n
End Sub

感谢 Tim Willams 的指点,这里是 PowerPoint 版本:

Dim eff As PictureEffect
With myDocument.Shapes(1).Fill.PictureEffects
  Set eff = .Insert(msoEffectSharpenSoften)
  eff.EffectParameters(1).Value = 0.1
End With

这对我有用:

For n = 1 To 3

  Set myDocument = ActivePresentation.Slides(Z)
  Set shp = myDocument.Shapes(1)
  With shp.PictureFormat
    .CropBottom = 10
    .CropLeft = 10
    .CropRight = 10
    .CropTop = 10
    .IncrementContrast 0.3
    .IncrementBrightness 0.1
  End With

  With shp.Fill.PictureEffects
    Dim eff As PictureEffect
    Set eff = .Insert(msoEffectSharpenSoften)
    eff.EffectParameters(1).Value = -0.5
  End With


  Z = Z + 1
Next n