Removed visual basic lib dependency
This commit is contained in:
parent
65aeabdfee
commit
ab33d4558f
11 changed files with 102 additions and 2084 deletions
|
|
@ -1,3 +0,0 @@
|
||||||
Public Class Class1
|
|
||||||
|
|
||||||
End Class
|
|
||||||
|
|
@ -1,844 +0,0 @@
|
||||||
Imports System.Drawing
|
|
||||||
Imports System.IO
|
|
||||||
Imports System.Drawing.Drawing2D
|
|
||||||
Imports System.Drawing.Imaging
|
|
||||||
Imports System.Windows.Forms
|
|
||||||
'Imports System.Threading
|
|
||||||
|
|
||||||
Public Class ImageCreator
|
|
||||||
#Region "dichiarazioni"
|
|
||||||
|
|
||||||
|
|
||||||
Private FotoRuotaADestra As Boolean = False
|
|
||||||
Private FotoRuotaASinistra As Boolean = False
|
|
||||||
|
|
||||||
Private TempMinText As String = ""
|
|
||||||
'Private crFont1 As Font
|
|
||||||
Private _NomeFileChild As String
|
|
||||||
|
|
||||||
Private _SourceDir As DirectoryInfo
|
|
||||||
Private _DestDirStart As DirectoryInfo
|
|
||||||
Private _DestDir As DirectoryInfo
|
|
||||||
|
|
||||||
Private _workFile As FileInfo
|
|
||||||
|
|
||||||
Private testoFirma As String
|
|
||||||
Private testoFirmaV As String
|
|
||||||
Private alphaScelta As Integer
|
|
||||||
Private DimensioneStandard As Integer
|
|
||||||
Private DimensioneStandardMiniatura As Integer
|
|
||||||
Private dataFoto As DateTime
|
|
||||||
Private dataPartenzaI As DateTime
|
|
||||||
Private testoOrario As String
|
|
||||||
Private testoFirmaPiccola As String
|
|
||||||
Private thumbSizeSmall As Size
|
|
||||||
Private thumbSizeBig As Size
|
|
||||||
Private nomeFileSmall As String
|
|
||||||
Private nomeFileBig As String
|
|
||||||
Private nomeFileBig2 As String
|
|
||||||
|
|
||||||
Private yPosFromBottom As Single
|
|
||||||
Private yPosFromBottom1 As Single
|
|
||||||
Private yPosFromBottom2 As Single
|
|
||||||
Private yPosFromBottom3 As Single
|
|
||||||
Private yPosFromBottom4 As Single
|
|
||||||
#End Region
|
|
||||||
|
|
||||||
Public Sub New()
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Sub New(ByVal nomeFileChild As String, ByVal sourceDir As DirectoryInfo, ByVal destDir As DirectoryInfo, ByVal destDirStart As DirectoryInfo)
|
|
||||||
Me.NomeFileChild = nomeFileChild
|
|
||||||
Me.SourceDir = sourceDir
|
|
||||||
Me.DestDir = destDir
|
|
||||||
Me.DestDirStart = destDirStart
|
|
||||||
Me.WorkFile = New FileInfo(nomeFileChild)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Sub New(ByVal nomeFileChild As String, ByVal sourceDir As DirectoryInfo, ByVal destDir As DirectoryInfo)
|
|
||||||
Me.NomeFileChild = nomeFileChild
|
|
||||||
Me.DestDir = destDir
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Sub New(ByVal file As FileInfo, ByVal destination As DirectoryInfo)
|
|
||||||
Me.WorkFile = file
|
|
||||||
Me.DestDir = destination
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Sub CreaImmagineThread(ByVal Info As String)
|
|
||||||
|
|
||||||
Try
|
|
||||||
|
|
||||||
preparaVariabili()
|
|
||||||
'Dim g As System.Drawing.Image = System.Drawing.Image.FromFile(Path.Combine(SourceDir.FullName, NomeFileChild))
|
|
||||||
Using g As Image = Image.FromFile(WorkFile.FullName)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'Dim g As System.Drawing.Image = System.Drawing.Image.FromFile(WorkFile.FullName)
|
|
||||||
|
|
||||||
' Imposta testo extra
|
|
||||||
impostaTestoExtra(g)
|
|
||||||
|
|
||||||
' Ruota l'immagine in base ai dati EXIF
|
|
||||||
Rotation(g)
|
|
||||||
|
|
||||||
' Forza jpeg se è selezionata l'opzione
|
|
||||||
Dim thisFormat As System.Drawing.Imaging.ImageFormat = g.RawFormat
|
|
||||||
If PicSettings.UsaForzaJpg = True Then thisFormat = System.Drawing.Imaging.ImageFormat.Jpeg
|
|
||||||
|
|
||||||
prepareThumbnailSize(g)
|
|
||||||
|
|
||||||
Dim imgOutputBig As New Bitmap(g, thumbSizeBig.Width, thumbSizeBig.Height)
|
|
||||||
imgOutputBig.SetResolution(g.HorizontalResolution, g.VerticalResolution)
|
|
||||||
|
|
||||||
' Crea le miniature
|
|
||||||
creaMiniature(g, imgOutputBig, thisFormat)
|
|
||||||
|
|
||||||
aggiungiTesto(g, imgOutputBig)
|
|
||||||
|
|
||||||
aggiungiLogo(imgOutputBig)
|
|
||||||
|
|
||||||
salvaFoto(imgOutputBig, thumbSizeBig, nomeFileBig, nomeFileSmall, thumbSizeSmall, thisFormat)
|
|
||||||
End Using
|
|
||||||
'g.Dispose()
|
|
||||||
|
|
||||||
GC.Collect()
|
|
||||||
|
|
||||||
'PicSettings.mainForm.stepProgressBar()
|
|
||||||
|
|
||||||
Catch ex As Exception
|
|
||||||
Dim e = ex.Demystify()
|
|
||||||
Console.WriteLine(e)
|
|
||||||
Console.WriteLine(e.Message)
|
|
||||||
Console.WriteLine(e.StackTrace)
|
|
||||||
'MessageBox.Show(ex.Message)
|
|
||||||
|
|
||||||
|
|
||||||
End Try
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub Rotation(ByRef g As System.Drawing.Image)
|
|
||||||
|
|
||||||
FotoRuotaADestra = False
|
|
||||||
FotoRuotaASinistra = False
|
|
||||||
|
|
||||||
If PicSettings.UsaRotazioneAutomatica = True Then
|
|
||||||
If g.PropertyIdList.Length > 0 Then ' ci sono dati exif
|
|
||||||
Dim DatiExif As New ExifReader(CType(g, Bitmap))
|
|
||||||
|
|
||||||
Select Case DatiExif.Orientation
|
|
||||||
Case ExifReader.Orientations.BottomLeft
|
|
||||||
|
|
||||||
Case ExifReader.Orientations.BottomRight
|
|
||||||
|
|
||||||
Case ExifReader.Orientations.LeftTop
|
|
||||||
|
|
||||||
Case ExifReader.Orientations.LftBottom
|
|
||||||
FotoRuotaASinistra = True
|
|
||||||
Case ExifReader.Orientations.RightBottom
|
|
||||||
|
|
||||||
Case ExifReader.Orientations.RightTop
|
|
||||||
|
|
||||||
Case ExifReader.Orientations.TopLeft
|
|
||||||
|
|
||||||
Case ExifReader.Orientations.TopRight
|
|
||||||
|
|
||||||
End Select
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If FotoRuotaASinistra = True Then
|
|
||||||
g.RotateFlip(RotateFlipType.Rotate270FlipNone)
|
|
||||||
End If
|
|
||||||
If FotoRuotaADestra = True Then
|
|
||||||
g.RotateFlip(RotateFlipType.Rotate90FlipNone)
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
''' <summary>
|
|
||||||
''' Aggiunge Orario, tempo gara e altri
|
|
||||||
''' </summary>
|
|
||||||
''' <param name="g">Image</param>
|
|
||||||
''' <remarks></remarks>
|
|
||||||
Private Sub impostaTestoExtra(g As Image)
|
|
||||||
If PicSettings.UsaOrarioTestoApplicare Or
|
|
||||||
PicSettings.UsaTempoGaraTestoApplicare Or
|
|
||||||
PicSettings.UsaOrarioMiniatura Or
|
|
||||||
PicSettings.TestoMin Or
|
|
||||||
PicSettings.AggTempoGaraMin Or
|
|
||||||
PicSettings.AggNumTempMin Then
|
|
||||||
|
|
||||||
If g.PropertyIdList.Length > 0 Then ' ci sono dati exif
|
|
||||||
Dim DatiExif As New ExifReader(CType(g, Bitmap))
|
|
||||||
dataFoto = DatiExif.DateTimeOriginal
|
|
||||||
testoFirma = PicSettings.TestoFirmaStart
|
|
||||||
testoFirmaV = PicSettings.TestoFirmaStartV
|
|
||||||
|
|
||||||
If dataFoto.Year <> 1 Then
|
|
||||||
testoFirmaPiccola = dataFoto.ToShortTimeString
|
|
||||||
If PicSettings.UsaOrarioTestoApplicare = True Then
|
|
||||||
testoFirma &= " " & dataFoto.ToShortDateString & " " & dataFoto.ToLongTimeString
|
|
||||||
testoFirmaV &= " " & dataFoto.ToShortDateString & " " & dataFoto.ToLongTimeString
|
|
||||||
End If
|
|
||||||
If PicSettings.UsaTempoGaraTestoApplicare = True Then
|
|
||||||
Dim Orario As TimeSpan = New TimeSpan(DateDiff(DateInterval.Second, dataPartenzaI, dataFoto) * 10000000)
|
|
||||||
testoFirma &= " " & testoOrario & Orario.Hours.ToString("00") & ":" & Orario.Minutes.ToString("00") & ":" & Orario.Seconds.ToString("00")
|
|
||||||
testoFirmaV &= " " & testoOrario & Orario.Hours.ToString("00") & ":" & Orario.Minutes.ToString("00") & ":" & Orario.Seconds.ToString("00")
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
testoFirma = PicSettings.TestoFirmaStart
|
|
||||||
testoFirmaV = PicSettings.TestoFirmaStartV
|
|
||||||
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
''' <summary>
|
|
||||||
''' Prepara diverse variabili azzerandole, elaborandole e prendendole dalle impostazioni
|
|
||||||
''' </summary>
|
|
||||||
''' <remarks></remarks>
|
|
||||||
Private Sub preparaVariabili()
|
|
||||||
alphaScelta = CType((255 * (100 - PicSettings.Trasparenza) / 100), Integer)
|
|
||||||
testoFirma = ""
|
|
||||||
testoFirmaV = ""
|
|
||||||
dataPartenzaI = PicSettings.DataPartenza
|
|
||||||
testoOrario = PicSettings.TestoOrario
|
|
||||||
If testoOrario.Length > 0 Then testoOrario &= " "
|
|
||||||
testoFirmaPiccola = ""
|
|
||||||
thumbSizeSmall = New Size
|
|
||||||
thumbSizeBig = New Size
|
|
||||||
nomeFileSmall = ""
|
|
||||||
nomeFileBig2 = ""
|
|
||||||
nomeFileBig = ""
|
|
||||||
DimensioneStandard = PicSettings.DimStandard
|
|
||||||
DimensioneStandardMiniatura = PicSettings.DimStandardMiniatura
|
|
||||||
'nomeFileSmall = Suffisso & NomeFileChild
|
|
||||||
'nomeFileBig = NomeFileChild
|
|
||||||
nomeFileSmall = Suffisso & WorkFile.Name
|
|
||||||
nomeFileBig = WorkFile.Name
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub prepareThumbnailSize(g As Image)
|
|
||||||
If g.Width > g.Height Then
|
|
||||||
thumbSizeSmall = NewthumbSize(g.Width, g.Height, LarghezzaSmall, "Larghezza")
|
|
||||||
Dim SizeOrig As New Size(g.Width, g.Height)
|
|
||||||
thumbSizeBig = SizeOrig
|
|
||||||
Else
|
|
||||||
thumbSizeSmall = NewthumbSize(g.Width, g.Height, AltezzaSmall, "Altezza")
|
|
||||||
Dim SizeOrig As New Size(g.Width, g.Height)
|
|
||||||
thumbSizeBig = SizeOrig
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub creaMiniature(g As Image, imgOutputBig As Bitmap, thisFormat As ImageFormat)
|
|
||||||
If PicSettings.TestoMin Then
|
|
||||||
testoFirmaPiccola = nomeFileBig
|
|
||||||
ElseIf PicSettings.AggNumTempMin Then
|
|
||||||
testoFirmaPiccola = nomeFileBig + " "
|
|
||||||
End If
|
|
||||||
'Dim yPosFromBottom4 As Single
|
|
||||||
|
|
||||||
Dim crFont1 As Font = Nothing
|
|
||||||
Dim crFont2 As Font = Nothing
|
|
||||||
Dim crSize1 As SizeF = New SizeF
|
|
||||||
Dim crSize2 As SizeF = New SizeF
|
|
||||||
|
|
||||||
If PicSettings.CreaMiniature = True Then
|
|
||||||
If PicSettings.AggiungiScritteMiniature = False Then
|
|
||||||
If PicSettings.DirectorySorgente.ToUpper = PicSettings.DirectoryDestinazione.ToUpper Then
|
|
||||||
nomeFileSmall = nomeFileSmall.Substring(0, nomeFileSmall.Length - 4) & Codice & nomeFileSmall.Substring(nomeFileSmall.Length - 4)
|
|
||||||
End If
|
|
||||||
If PicSettings.UsaOrarioMiniatura Or
|
|
||||||
PicSettings.TestoMin Or
|
|
||||||
PicSettings.AggTempoGaraMin Or
|
|
||||||
PicSettings.AggNumTempMin Then
|
|
||||||
|
|
||||||
If testoFirmaPiccola.Length > 0 Then
|
|
||||||
Dim imgOutputSmall As Bitmap
|
|
||||||
imgOutputSmall = CType(imgOutputBig.Clone, Bitmap)
|
|
||||||
|
|
||||||
Dim grPhoto1 As Graphics
|
|
||||||
grPhoto1 = Graphics.FromImage(imgOutputSmall)
|
|
||||||
grPhoto1.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias
|
|
||||||
|
|
||||||
Dim LarghezzaStandard1 As Integer
|
|
||||||
'quick fix
|
|
||||||
DimensioneStandardMiniatura = 50
|
|
||||||
If PicSettings.Grassetto = True Then
|
|
||||||
crFont1 = New Font(PicSettings.IlFont, DimensioneStandardMiniatura, FontStyle.Bold)
|
|
||||||
crFont2 = New Font(PicSettings.IlFont, DimensioneStandard, FontStyle.Bold)
|
|
||||||
Else
|
|
||||||
crFont1 = New Font(PicSettings.IlFont, DimensioneStandardMiniatura)
|
|
||||||
crFont2 = New Font(PicSettings.IlFont, DimensioneStandard)
|
|
||||||
End If
|
|
||||||
|
|
||||||
crSize1 = grPhoto1.MeasureString(testoFirmaPiccola, crFont1)
|
|
||||||
crSize2 = grPhoto1.MeasureString(testoFirma, crFont1)
|
|
||||||
LarghezzaStandard1 = CType(crSize1.Width, Integer)
|
|
||||||
|
|
||||||
If crSize1.Width > CType(g.Width, Single) Then
|
|
||||||
Dim Conta As Integer = DimensioneStandardMiniatura
|
|
||||||
Do
|
|
||||||
If Conta > 20 Then
|
|
||||||
Conta -= 5
|
|
||||||
Else
|
|
||||||
Conta -= 1
|
|
||||||
End If
|
|
||||||
If PicSettings.Grassetto = True Then
|
|
||||||
crFont1 = New Font(PicSettings.IlFont, Conta, FontStyle.Bold)
|
|
||||||
Else
|
|
||||||
crFont1 = New Font(PicSettings.IlFont, Conta)
|
|
||||||
End If
|
|
||||||
crSize1 = grPhoto1.MeasureString(testoFirmaPiccola, crFont1)
|
|
||||||
If crSize1.Width < CType(g.Width, Single) Then
|
|
||||||
LarghezzaStandard1 = CType(crSize1.Width, Integer)
|
|
||||||
Exit Do
|
|
||||||
End If
|
|
||||||
If Conta <= 5 Then Exit Do
|
|
||||||
Loop
|
|
||||||
DimensioneStandardMiniatura = Conta
|
|
||||||
End If
|
|
||||||
|
|
||||||
Select Case PicSettings.Posizione.ToUpper
|
|
||||||
Case "ALTO"
|
|
||||||
yPosFromBottom1 = (PicSettings.Margine)
|
|
||||||
yPosFromBottom4 = (PicSettings.MargVert)
|
|
||||||
|
|
||||||
Case "BASSO"
|
|
||||||
yPosFromBottom1 = CType((g.Height - crSize1.Height - (g.Height * PicSettings.Margine / 100)), Single)
|
|
||||||
yPosFromBottom4 = CType((g.Height - crSize1.Height - (g.Height * PicSettings.MargVert / 100)), Single)
|
|
||||||
|
|
||||||
End Select
|
|
||||||
|
|
||||||
Dim xCenterOfImg1 As Single
|
|
||||||
|
|
||||||
Dim StrFormat1 As StringFormat = New StringFormat
|
|
||||||
Select Case PicSettings.Allineamento.ToUpper
|
|
||||||
Case "SINISTRA"
|
|
||||||
xCenterOfImg1 = CType((PicSettings.Margine + (LarghezzaStandard1 / 2)), Single)
|
|
||||||
|
|
||||||
If (LarghezzaStandard1 / 2) > (g.Width / 2) - PicSettings.Margine Then
|
|
||||||
xCenterOfImg1 = CType((g.Width / 2), Single)
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
Case "CENTRO"
|
|
||||||
xCenterOfImg1 = CType((g.Width / 2), Single)
|
|
||||||
|
|
||||||
|
|
||||||
Case "DESTRA"
|
|
||||||
xCenterOfImg1 = CType((g.Width - PicSettings.Margine - (LarghezzaStandard1 / 2)), Single)
|
|
||||||
|
|
||||||
If (LarghezzaStandard1 / 2) > (g.Width / 2) - PicSettings.Margine Then
|
|
||||||
xCenterOfImg1 = CType((g.Width / 2), Single)
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
End Select
|
|
||||||
StrFormat1.Alignment = StringAlignment.Center
|
|
||||||
|
|
||||||
Dim semiTransBrush21 As SolidBrush = New SolidBrush(Color.FromArgb(alphaScelta, 0, 0, 0))
|
|
||||||
Dim semiTransBrush1 As SolidBrush = New SolidBrush(Color.FromArgb(alphaScelta, PicSettings.fontColoreRGB))
|
|
||||||
|
|
||||||
'quick fix
|
|
||||||
DimensioneStandardMiniatura = PicSettings.DimMin
|
|
||||||
|
|
||||||
If PicSettings.Grassetto = True Then
|
|
||||||
crFont1 = New Font(PicSettings.IlFont, DimensioneStandardMiniatura, FontStyle.Bold)
|
|
||||||
Else
|
|
||||||
crFont1 = New Font(PicSettings.IlFont, DimensioneStandardMiniatura)
|
|
||||||
End If
|
|
||||||
'asdgadfhdfhjgfsjgfjygfdhsdafa
|
|
||||||
If PicSettings.TestoMin Then
|
|
||||||
grPhoto1.DrawString(nomeFileBig, crFont1, semiTransBrush21, New PointF(xCenterOfImg1 + 1, yPosFromBottom1 + 1), StrFormat1)
|
|
||||||
grPhoto1.DrawString(nomeFileBig, crFont1, semiTransBrush1, New PointF(xCenterOfImg1, yPosFromBottom1), StrFormat1)
|
|
||||||
ElseIf PicSettings.AggTempoGaraMin And PicSettings.UsaTempoGaraTestoApplicare Then
|
|
||||||
Dim Orario As TimeSpan = New TimeSpan(DateDiff(DateInterval.Second, dataPartenzaI, dataFoto) * 10000000)
|
|
||||||
Dim tempstr As String = ""
|
|
||||||
|
|
||||||
|
|
||||||
tempstr &= ControlChars.CrLf & testoOrario & Orario.Hours.ToString("00") & ":" & Orario.Minutes.ToString("00") & ":" & Orario.Seconds.ToString("00")
|
|
||||||
|
|
||||||
|
|
||||||
grPhoto1.DrawString(tempstr, crFont1, semiTransBrush21, New PointF(xCenterOfImg1 + 1, yPosFromBottom1 + 1), StrFormat1)
|
|
||||||
grPhoto1.DrawString(tempstr, crFont1, semiTransBrush1, New PointF(xCenterOfImg1, yPosFromBottom1), StrFormat1)
|
|
||||||
|
|
||||||
ElseIf PicSettings.AggNumTempMin Then
|
|
||||||
Dim Orario As TimeSpan = New TimeSpan(DateDiff(DateInterval.Second, dataPartenzaI, dataFoto) * 10000000)
|
|
||||||
Dim tempstr As String = ""
|
|
||||||
tempstr &= nomeFileBig
|
|
||||||
|
|
||||||
tempstr &= ControlChars.CrLf & testoOrario & Orario.Hours.ToString("00") & ":" & Orario.Minutes.ToString("00") & ":" & Orario.Seconds.ToString("00")
|
|
||||||
|
|
||||||
|
|
||||||
grPhoto1.DrawString(tempstr, crFont1, semiTransBrush21, New PointF(xCenterOfImg1 + 1, yPosFromBottom1 + 1), StrFormat1)
|
|
||||||
grPhoto1.DrawString(tempstr, crFont1, semiTransBrush1, New PointF(xCenterOfImg1, yPosFromBottom1), StrFormat1)
|
|
||||||
|
|
||||||
|
|
||||||
Else
|
|
||||||
grPhoto1.DrawString(testoFirmaPiccola, crFont1, semiTransBrush21, New PointF(xCenterOfImg1 + 1, yPosFromBottom1 + 1), StrFormat1)
|
|
||||||
grPhoto1.DrawString(testoFirmaPiccola, crFont1, semiTransBrush1, New PointF(xCenterOfImg1, yPosFromBottom1), StrFormat1)
|
|
||||||
End If
|
|
||||||
|
|
||||||
' Salva la miniatura
|
|
||||||
imgOutputSmall.Save(Path.Combine(DestDir.FullName, "Temp_" & nomeFileSmall), thisFormat)
|
|
||||||
Dim g2 As System.Drawing.Image = System.Drawing.Image.FromFile(Path.Combine(DestDir.FullName, "Temp_" & nomeFileSmall))
|
|
||||||
Dim imgOutputSmall2 As New Bitmap(g2, thumbSizeSmall.Width, thumbSizeSmall.Height)
|
|
||||||
imgOutputSmall2.Save(Path.Combine(DestDir.FullName, nomeFileSmall), thisFormat)
|
|
||||||
|
|
||||||
imgOutputSmall2.Dispose()
|
|
||||||
imgOutputSmall.Dispose()
|
|
||||||
g2.Dispose()
|
|
||||||
Kill(Path.Combine(DestDir.FullName, "Temp_" & nomeFileSmall))
|
|
||||||
Else
|
|
||||||
Dim imgOutputSmall As New Bitmap(g, thumbSizeSmall.Width, thumbSizeSmall.Height)
|
|
||||||
imgOutputSmall.Save(Path.Combine(DestDir.FullName, nomeFileSmall), thisFormat)
|
|
||||||
imgOutputSmall.Dispose()
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
Dim imgOutputSmall As New Bitmap(g, thumbSizeSmall.Width, thumbSizeSmall.Height)
|
|
||||||
imgOutputSmall.Save(Path.Combine(DestDir.FullName, nomeFileSmall), thisFormat)
|
|
||||||
imgOutputSmall.Dispose()
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub aggiungiTesto(g As Image, imgOutputBig As Bitmap)
|
|
||||||
Dim grPhoto As Graphics
|
|
||||||
grPhoto = Graphics.FromImage(imgOutputBig)
|
|
||||||
grPhoto.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias
|
|
||||||
|
|
||||||
Dim crFont As Font = Nothing
|
|
||||||
Dim crSize As SizeF = New SizeF
|
|
||||||
Dim LarghezzaStandard As Integer
|
|
||||||
|
|
||||||
If PicSettings.Grassetto = True Then
|
|
||||||
crFont = New Font(PicSettings.IlFont, DimensioneStandard, FontStyle.Bold)
|
|
||||||
Else
|
|
||||||
crFont = New Font(PicSettings.IlFont, DimensioneStandard)
|
|
||||||
End If
|
|
||||||
crSize = grPhoto.MeasureString(testoFirma, crFont)
|
|
||||||
LarghezzaStandard = CType(crSize.Width, Integer)
|
|
||||||
|
|
||||||
If crSize.Width > CType(g.Width, Single) Then
|
|
||||||
Dim Conta As Integer = DimensioneStandard
|
|
||||||
Do
|
|
||||||
If Conta > 20 Then
|
|
||||||
Conta -= 5
|
|
||||||
Else
|
|
||||||
Conta -= 1
|
|
||||||
End If
|
|
||||||
If PicSettings.Grassetto = True Then
|
|
||||||
crFont = New Font(PicSettings.IlFont, Conta, FontStyle.Bold)
|
|
||||||
Else
|
|
||||||
crFont = New Font(PicSettings.IlFont, Conta)
|
|
||||||
End If
|
|
||||||
crSize = grPhoto.MeasureString(testoFirma, crFont)
|
|
||||||
If crSize.Width < CType(g.Width, Single) Then
|
|
||||||
LarghezzaStandard = CType(crSize.Width, Integer)
|
|
||||||
Exit Do
|
|
||||||
End If
|
|
||||||
If Conta <= 5 Then Exit Do
|
|
||||||
Loop
|
|
||||||
DimensioneStandard = Conta
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
Select Case PicSettings.Posizione.ToUpper
|
|
||||||
Case "ALTO"
|
|
||||||
yPosFromBottom = (PicSettings.Margine)
|
|
||||||
yPosFromBottom3 = (PicSettings.MargVert)
|
|
||||||
|
|
||||||
Case "BASSO"
|
|
||||||
yPosFromBottom = CType((g.Height - crSize.Height - (g.Height * PicSettings.Margine / 100)), Single)
|
|
||||||
yPosFromBottom3 = CType((g.Height - crSize.Height - (g.Height * PicSettings.MargVert / 100)), Single)
|
|
||||||
End Select
|
|
||||||
|
|
||||||
Dim xCenterOfImg As Single
|
|
||||||
Dim xCenterOfImg3 As Single
|
|
||||||
Dim StrFormat As StringFormat = New StringFormat
|
|
||||||
Select Case PicSettings.Allineamento.ToUpper
|
|
||||||
Case "SINISTRA"
|
|
||||||
xCenterOfImg = CType((PicSettings.Margine + (LarghezzaStandard / 2)), Single)
|
|
||||||
xCenterOfImg3 = CType((PicSettings.MargVert + (LarghezzaStandard / 2)), Single)
|
|
||||||
If (LarghezzaStandard / 2) > (g.Width / 2) - PicSettings.Margine Then
|
|
||||||
xCenterOfImg = CType((g.Width / 2), Single)
|
|
||||||
End If
|
|
||||||
If (LarghezzaStandard / 2) > (g.Width / 2) - PicSettings.MargVert Then
|
|
||||||
xCenterOfImg3 = CType((g.Width / 2), Single)
|
|
||||||
End If
|
|
||||||
|
|
||||||
Case "CENTRO"
|
|
||||||
xCenterOfImg = CType((g.Width / 2), Single)
|
|
||||||
|
|
||||||
Case "DESTRA"
|
|
||||||
xCenterOfImg = CType((g.Width - PicSettings.Margine - (LarghezzaStandard / 2)), Single)
|
|
||||||
xCenterOfImg3 = CType((g.Width - PicSettings.MargVert - (LarghezzaStandard / 2)), Single)
|
|
||||||
If (LarghezzaStandard / 2) > (g.Width / 2) - PicSettings.Margine Then
|
|
||||||
xCenterOfImg = CType((g.Width / 2), Single)
|
|
||||||
End If
|
|
||||||
If (LarghezzaStandard / 2) > (g.Width / 2) - PicSettings.MargVert Then
|
|
||||||
xCenterOfImg3 = CType((g.Width / 2), Single)
|
|
||||||
End If
|
|
||||||
|
|
||||||
End Select
|
|
||||||
StrFormat.Alignment = StringAlignment.Center
|
|
||||||
|
|
||||||
Dim semiTransBrush2 As SolidBrush = New SolidBrush(Color.FromArgb(alphaScelta, 0, 0, 0))
|
|
||||||
'Dim semiTransBrush As SolidBrush = New SolidBrush(Color.FromArgb(AlphaScelta, _FontColoreR, _FontColoreG, _FontColoreB))
|
|
||||||
Dim semiTransBrush As SolidBrush = New SolidBrush(Color.FromArgb(alphaScelta, PicSettings.fontColoreRGB))
|
|
||||||
|
|
||||||
If FotoRuotaADestra Or FotoRuotaASinistra Then
|
|
||||||
|
|
||||||
If PicSettings.Grassetto = True Then
|
|
||||||
crFont = New Font(PicSettings.IlFont, DimVert, FontStyle.Bold)
|
|
||||||
Else
|
|
||||||
crFont = New Font(PicSettings.IlFont, DimVert)
|
|
||||||
End If
|
|
||||||
|
|
||||||
Else
|
|
||||||
|
|
||||||
If PicSettings.Grassetto = True Then
|
|
||||||
crFont = New Font(PicSettings.IlFont, DimensioneStandard, FontStyle.Bold)
|
|
||||||
Else
|
|
||||||
crFont = New Font(PicSettings.IlFont, DimensioneStandard)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
'qui scrive il testo (nomefilebig)
|
|
||||||
If PicSettings.TestoNome Then
|
|
||||||
If NomeData And g.PropertyIdList.Length > 0 Then
|
|
||||||
Dim DatiExif As New ExifReader(CType(g, Bitmap))
|
|
||||||
dataFoto = DatiExif.DateTimeOriginal
|
|
||||||
|
|
||||||
grPhoto.DrawString((nomeFileBig & " " & dataFoto.ToShortDateString), crFont, semiTransBrush2, New PointF(xCenterOfImg + 1, yPosFromBottom + 1), StrFormat)
|
|
||||||
grPhoto.DrawString((nomeFileBig & " " & dataFoto.ToShortDateString), crFont, semiTransBrush, New PointF(xCenterOfImg, yPosFromBottom), StrFormat)
|
|
||||||
Else
|
|
||||||
grPhoto.DrawString(nomeFileBig, crFont, semiTransBrush2, New PointF(xCenterOfImg + 1, yPosFromBottom + 1), StrFormat)
|
|
||||||
grPhoto.DrawString(nomeFileBig, crFont, semiTransBrush, New PointF(xCenterOfImg, yPosFromBottom), StrFormat)
|
|
||||||
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If PicSettings.TestoNome = False Then
|
|
||||||
If FotoRuotaADestra Or FotoRuotaASinistra Then
|
|
||||||
If PicSettings.TestoMin = False Then
|
|
||||||
|
|
||||||
|
|
||||||
grPhoto.DrawString(testoFirmaV, crFont, semiTransBrush2, New PointF(xCenterOfImg + 1, yPosFromBottom3 + 1), StrFormat)
|
|
||||||
grPhoto.DrawString(testoFirmaV, crFont, semiTransBrush, New PointF(xCenterOfImg, yPosFromBottom3), StrFormat)
|
|
||||||
End If
|
|
||||||
If PicSettings.TestoMin = True Then
|
|
||||||
|
|
||||||
grPhoto.DrawString(testoFirmaV, crFont, semiTransBrush2, New PointF(xCenterOfImg + 1, yPosFromBottom4 + 1), StrFormat)
|
|
||||||
grPhoto.DrawString(testoFirmaV, crFont, semiTransBrush, New PointF(xCenterOfImg, yPosFromBottom4), StrFormat)
|
|
||||||
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
grPhoto.DrawString(testoFirma, crFont, semiTransBrush2, New PointF(xCenterOfImg + 1, yPosFromBottom + 1), StrFormat)
|
|
||||||
grPhoto.DrawString(testoFirma, crFont, semiTransBrush, New PointF(xCenterOfImg, yPosFromBottom), StrFormat)
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If PicSettings.DirectorySorgente.ToUpper = PicSettings.DirectoryDestinazione.ToUpper Then
|
|
||||||
nomeFileBig2 = nomeFileBig
|
|
||||||
nomeFileBig = nomeFileBig.Substring(0, nomeFileBig.Length - 4) & Codice & nomeFileBig.Substring(nomeFileBig.Length - 4)
|
|
||||||
End If
|
|
||||||
grPhoto.Dispose()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Private Sub aggiungiLogo(imgOutputBig As Bitmap)
|
|
||||||
'imgOutputBig
|
|
||||||
If PicSettings.LogoAggiungi = True And File.Exists(PicSettings.LogoNomeFile) Then
|
|
||||||
|
|
||||||
Dim ImmagineLogo As Image = Image.FromFile(PicSettings.LogoNomeFile)
|
|
||||||
|
|
||||||
Dim LogoColoreTrasparente As Color = Color.White
|
|
||||||
'Dim bmWatermark As Bitmap
|
|
||||||
|
|
||||||
'* Create a Bitmap based on the previously modified photograph Bitmap
|
|
||||||
'bmWatermark = New Bitmap(imgOutputBig)
|
|
||||||
'bmWatermark.SetResolution(imgOutputBig.HorizontalResolution, imgOutputBig.VerticalResolution)
|
|
||||||
|
|
||||||
'* Load this Bitmap into a new Graphic Object
|
|
||||||
Dim grWatermark As Graphics = Graphics.FromImage(imgOutputBig)
|
|
||||||
|
|
||||||
'* To achieve a translucent watermark we will apply (2) color manipulations
|
|
||||||
Dim imageAttributes As Imaging.ImageAttributes = New Imaging.ImageAttributes
|
|
||||||
|
|
||||||
'* The first step replace the background color with one that is transparent (Alpha=0, R=0, G=0, B=0)
|
|
||||||
Dim colorMap As Imaging.ColorMap = New Imaging.ColorMap
|
|
||||||
|
|
||||||
'* background this will be the color we search for and replace with transparency
|
|
||||||
colorMap.OldColor = LogoColoreTrasparente
|
|
||||||
colorMap.NewColor = Color.FromArgb(0, 0, 0, 0)
|
|
||||||
|
|
||||||
Dim remapTable As Imaging.ColorMap() = {colorMap}
|
|
||||||
imageAttributes.SetRemapTable(remapTable, Imaging.ColorAdjustType.Bitmap)
|
|
||||||
|
|
||||||
'* The second color manipulation is used to change the opacity by setting the 3rd row and 3rd column to 0.3f
|
|
||||||
Dim colorMatrixElements As Single()() = {New Single() {1.0F, 0.0F, 0.0F, 0.0F, 0.0F}, New Single() {0.0F, 1.0F, 0.0F, 0.0F, 0.0F}, New Single() {0.0F, 0.0F, 1.0F, 0.0F, 0.0F}, New Single() {0.0F, 0.0F, 0.0F, CType(PicSettings.LogoTrasparenza, Single) / 100, 0.0F}, New Single() {0.0F, 0.0F, 0.0F, 0.0F, 1.0F}}
|
|
||||||
Dim wmColorMatrix As Imaging.ColorMatrix = New Imaging.ColorMatrix(colorMatrixElements)
|
|
||||||
imageAttributes.SetColorMatrix(wmColorMatrix, Imaging.ColorMatrixFlag.Default, Imaging.ColorAdjustType.Bitmap)
|
|
||||||
|
|
||||||
Dim FotoLogoH As Integer = PicSettings.LogoAltezza
|
|
||||||
Dim FotoLogoW As Integer = PicSettings.LogoLarghezza
|
|
||||||
Dim FattoreAlt As Double = ImmagineLogo.Height / FotoLogoH
|
|
||||||
Dim FattoreLarg As Double = ImmagineLogo.Width / FotoLogoW
|
|
||||||
Dim NuovaSize As Size
|
|
||||||
If FattoreLarg > FattoreAlt Then
|
|
||||||
NuovaSize = NewthumbSize(ImmagineLogo.Width, ImmagineLogo.Height, FotoLogoW, "Larghezza")
|
|
||||||
Else
|
|
||||||
NuovaSize = NewthumbSize(ImmagineLogo.Width, ImmagineLogo.Height, FotoLogoH, "Altezza")
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim MargineUsato As Integer
|
|
||||||
Dim MargineL As Integer
|
|
||||||
Dim InPercentualeL As Boolean
|
|
||||||
If PicSettings.LogoMargine.EndsWith("%") = True Then
|
|
||||||
InPercentualeL = True
|
|
||||||
Else
|
|
||||||
InPercentualeL = False
|
|
||||||
End If
|
|
||||||
MargineL = CType(Val(PicSettings.LogoMargine), Integer)
|
|
||||||
If InPercentualeL = True Then
|
|
||||||
MargineUsato = CType(imgOutputBig.Height * MargineL / 100, Integer)
|
|
||||||
Else
|
|
||||||
MargineUsato = MargineL
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim xPosOfWm As Integer
|
|
||||||
Dim yPosOfWm As Integer
|
|
||||||
Select Case PicSettings.LogoPosizioneH.ToUpper
|
|
||||||
Case "SINISTRA", "NESSUNA"
|
|
||||||
xPosOfWm = MargineUsato
|
|
||||||
|
|
||||||
Case "CENTRO"
|
|
||||||
xPosOfWm = CType((imgOutputBig.Width - NuovaSize.Width) / 2, Integer)
|
|
||||||
|
|
||||||
Case "DESTRA"
|
|
||||||
xPosOfWm = ((imgOutputBig.Width - NuovaSize.Width) - MargineUsato)
|
|
||||||
End Select
|
|
||||||
Select Case PicSettings.LogoPosizioneV.ToUpper
|
|
||||||
Case "ALTO", "NESSUNA"
|
|
||||||
yPosOfWm = MargineUsato
|
|
||||||
|
|
||||||
Case "CENTRO"
|
|
||||||
yPosOfWm = CType((imgOutputBig.Height - NuovaSize.Height) / 2, Integer)
|
|
||||||
|
|
||||||
Case "BASSO"
|
|
||||||
yPosOfWm = ((imgOutputBig.Height - NuovaSize.Height) - MargineUsato)
|
|
||||||
End Select
|
|
||||||
|
|
||||||
grWatermark.DrawImage(ImmagineLogo, New Rectangle(xPosOfWm, yPosOfWm, NuovaSize.Width, NuovaSize.Height), 0, 0, ImmagineLogo.Width, ImmagineLogo.Height, GraphicsUnit.Pixel, imageAttributes)
|
|
||||||
grWatermark.Dispose()
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
|
|
||||||
Private Sub salvaFoto(imgOutputBig As Bitmap, thumbSizeBig As Size, NomeFileBig As String, NomeFileSmall As String, thumbSizeSmall As Size, thisFormat As ImageFormat)
|
|
||||||
|
|
||||||
If PicSettings.FotoGrandeDimOrigina = False Then
|
|
||||||
'attenzione non controlla se è png
|
|
||||||
'imgOutputBig.Save(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileBig), thisFormat)
|
|
||||||
If thisFormat.Equals(ImageFormat.Jpeg) Then
|
|
||||||
salvaImmagineCustomQuality(imgOutputBig, Path.Combine(DestDir.FullName, "Temp_" & NomeFileBig), jpegQuality)
|
|
||||||
Else
|
|
||||||
imgOutputBig.Save(Path.Combine(_DestDir.FullName, "Temp_" & NomeFileBig), thisFormat)
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
Dim g2 As System.Drawing.Image = System.Drawing.Image.FromFile(Path.Combine(DestDir.FullName, "Temp_" & NomeFileBig))
|
|
||||||
If g2.Width > g2.Height Then
|
|
||||||
thumbSizeBig = NewthumbSize(g2.Width, g2.Height, PicSettings.LarghezzaBig, "Larghezza")
|
|
||||||
Else
|
|
||||||
thumbSizeBig = NewthumbSize(g2.Width, g2.Height, PicSettings.AltezzaBig, "Altezza")
|
|
||||||
End If
|
|
||||||
Dim imgOutputBig2 As New Bitmap(g2, thumbSizeBig.Width, thumbSizeBig.Height)
|
|
||||||
'
|
|
||||||
If thisFormat.Equals(ImageFormat.Jpeg) Then
|
|
||||||
salvaImmagineCustomQuality(imgOutputBig2, Path.Combine(DestDir.FullName, NomeFileBig), jpegQuality)
|
|
||||||
Else
|
|
||||||
imgOutputBig2.Save(Path.Combine(_DestDir.FullName, NomeFileBig), thisFormat)
|
|
||||||
End If
|
|
||||||
|
|
||||||
imgOutputBig2.Dispose()
|
|
||||||
imgOutputBig.Dispose()
|
|
||||||
g2.Dispose()
|
|
||||||
Else
|
|
||||||
'
|
|
||||||
If thisFormat.Equals(ImageFormat.Jpeg) Then
|
|
||||||
salvaImmagineCustomQuality(imgOutputBig, Path.Combine(DestDir.FullName, NomeFileBig), jpegQuality)
|
|
||||||
Else
|
|
||||||
imgOutputBig.Save(Path.Combine(_DestDir.FullName, NomeFileBig), thisFormat)
|
|
||||||
End If
|
|
||||||
|
|
||||||
imgOutputBig.Dispose()
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
If PicSettings.CreaMiniature Then
|
|
||||||
If PicSettings.AggiungiScritteMiniature = True Then
|
|
||||||
Dim g1 As System.Drawing.Image
|
|
||||||
If PicSettings.FotoGrandeDimOrigina = False Then
|
|
||||||
g1 = System.Drawing.Image.FromFile(Path.Combine(DestDir.FullName, "Temp_" & NomeFileBig))
|
|
||||||
Else
|
|
||||||
g1 = System.Drawing.Image.FromFile(Path.Combine(DestDir.FullName, NomeFileBig))
|
|
||||||
End If
|
|
||||||
Dim imgOutputSmall As New Bitmap(g1, thumbSizeSmall.Width, thumbSizeSmall.Height)
|
|
||||||
If PicSettings.DirectorySorgente.ToUpper = PicSettings.DirectoryDestinazione.ToUpper Then
|
|
||||||
NomeFileSmall = NomeFileSmall.Substring(0, NomeFileSmall.Length - 4) & Codice & NomeFileSmall.Substring(NomeFileSmall.Length - 4)
|
|
||||||
End If
|
|
||||||
'
|
|
||||||
If thisFormat.Equals(ImageFormat.Jpeg) Then
|
|
||||||
salvaImmagineCustomQuality(imgOutputSmall, Path.Combine(DestDir.FullName, NomeFileSmall), jpegQualityMin)
|
|
||||||
Else
|
|
||||||
imgOutputSmall.Save(Path.Combine(_DestDir.FullName, NomeFileSmall), thisFormat)
|
|
||||||
End If
|
|
||||||
|
|
||||||
imgOutputSmall.Dispose()
|
|
||||||
g1.Dispose()
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
If File.Exists(Path.Combine(DestDir.FullName, "Temp_" & NomeFileBig)) = True Then
|
|
||||||
Kill(Path.Combine(DestDir.FullName, "Temp_" & NomeFileBig))
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub salvaImmagineCustomQuality(imageToSave As Bitmap, nomeFileFinale As String, quality As Long)
|
|
||||||
|
|
||||||
Dim JgpEncoder As ImageCodecInfo = GetEncoder(ImageFormat.Jpeg)
|
|
||||||
Dim MyEncoder As Encoder = Encoder.Quality
|
|
||||||
|
|
||||||
Dim MyEncoderParameters As New EncoderParameters(1)
|
|
||||||
|
|
||||||
Dim MyEncoderParameter As New EncoderParameter(MyEncoder, jpegQuality)
|
|
||||||
MyEncoderParameters.Param(0) = MyEncoderParameter
|
|
||||||
imageToSave.Save(nomeFileFinale, JgpEncoder, MyEncoderParameters)
|
|
||||||
imageToSave.Dispose()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Private Function GetEncoder(ByVal format As ImageFormat) As ImageCodecInfo
|
|
||||||
|
|
||||||
Dim codecs As ImageCodecInfo() = ImageCodecInfo.GetImageDecoders()
|
|
||||||
|
|
||||||
Dim codec As ImageCodecInfo
|
|
||||||
For Each codec In codecs
|
|
||||||
If codec.FormatID = format.Guid Then
|
|
||||||
Return codec
|
|
||||||
End If
|
|
||||||
Next codec
|
|
||||||
Return Nothing
|
|
||||||
|
|
||||||
End Function
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
''' <summary>
|
|
||||||
''' Calculate the Size of the New image
|
|
||||||
''' </summary>
|
|
||||||
''' <param name="currentwidth">Larghezza</param>
|
|
||||||
''' <param name="currentheight">Altezza</param>
|
|
||||||
''' <param name="MaxPixel"></param>
|
|
||||||
''' <param name="TipoSize"></param>
|
|
||||||
''' <returns></returns>
|
|
||||||
''' <remarks></remarks>
|
|
||||||
Private Function NewthumbSize(ByVal currentwidth As Integer, ByVal currentheight As Integer, ByVal MaxPixel As Integer, ByVal TipoSize As String) As Size
|
|
||||||
' e
|
|
||||||
'*** Larghezza, Altezza, Auto
|
|
||||||
|
|
||||||
Dim tempMultiplier As Double
|
|
||||||
|
|
||||||
If TipoSize.ToUpper = "Larghezza".ToUpper Then
|
|
||||||
tempMultiplier = MaxPixel / currentwidth
|
|
||||||
ElseIf TipoSize.ToUpper = "Altezza".ToUpper Then
|
|
||||||
tempMultiplier = MaxPixel / currentheight
|
|
||||||
Else
|
|
||||||
If currentheight > currentwidth Then ' portrait
|
|
||||||
tempMultiplier = MaxPixel / currentheight
|
|
||||||
Else
|
|
||||||
tempMultiplier = MaxPixel / currentwidth
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim NewSize As New Size(CInt(currentwidth * tempMultiplier), CInt(currentheight * tempMultiplier))
|
|
||||||
|
|
||||||
Return NewSize
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Property WorkFile() As FileInfo
|
|
||||||
Get
|
|
||||||
Return _workFile
|
|
||||||
End Get
|
|
||||||
Set(value As FileInfo)
|
|
||||||
_workFile = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property DestDir() As DirectoryInfo
|
|
||||||
Get
|
|
||||||
Return _DestDir
|
|
||||||
End Get
|
|
||||||
Set(ByVal value As DirectoryInfo)
|
|
||||||
_DestDir = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property SourceDir() As DirectoryInfo
|
|
||||||
Get
|
|
||||||
Return _SourceDir
|
|
||||||
End Get
|
|
||||||
Set(ByVal value As DirectoryInfo)
|
|
||||||
_SourceDir = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property DestDirStart() As DirectoryInfo
|
|
||||||
Get
|
|
||||||
Return _DestDirStart
|
|
||||||
End Get
|
|
||||||
Set(ByVal value As DirectoryInfo)
|
|
||||||
_DestDirStart = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property NomeFileChild() As String
|
|
||||||
Get
|
|
||||||
Return _NomeFileChild
|
|
||||||
End Get
|
|
||||||
Set(ByVal value As String)
|
|
||||||
_NomeFileChild = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
|
||||||
|
|
@ -8,7 +8,6 @@ using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using CatalogVbLib;
|
|
||||||
using Dasync.Collections;
|
using Dasync.Collections;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,12 +10,10 @@ using System.Runtime.CompilerServices;
|
||||||
using System.Security;
|
using System.Security;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.VisualBasic;
|
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using System.Drawing.Imaging;
|
using System.Drawing.Imaging;
|
||||||
using System.Windows.Forms;
|
using MaddoShared;
|
||||||
using CatalogVbLib;
|
|
||||||
using SixLabors.ImageSharp.Metadata.Profiles.Exif;
|
using SixLabors.ImageSharp.Metadata.Profiles.Exif;
|
||||||
|
|
||||||
// Imports System.Threading
|
// Imports System.Threading
|
||||||
|
|
@ -57,7 +55,7 @@ public class ImageCreatorSharp : IDisposable
|
||||||
private float yPosFromBottom3;
|
private float yPosFromBottom3;
|
||||||
private float yPosFromBottom4;
|
private float yPosFromBottom4;
|
||||||
|
|
||||||
private ExifReader.Orientations _orientation;
|
private Orientations _orientation;
|
||||||
private DateTime? _creationDate;
|
private DateTime? _creationDate;
|
||||||
|
|
||||||
public ImageCreatorSharp()
|
public ImageCreatorSharp()
|
||||||
|
|
@ -144,7 +142,7 @@ public class ImageCreatorSharp : IDisposable
|
||||||
private void ExtractExif()
|
private void ExtractExif()
|
||||||
{
|
{
|
||||||
using var img = SixLabors.ImageSharp.Image.Load(_workFile.FullName);
|
using var img = SixLabors.ImageSharp.Image.Load(_workFile.FullName);
|
||||||
_orientation = ExifReader.Orientations.TopLeft;
|
_orientation = Orientations.TopLeft;
|
||||||
|
|
||||||
IExifValue<ushort> rotation = null;
|
IExifValue<ushort> rotation = null;
|
||||||
|
|
||||||
|
|
@ -153,7 +151,7 @@ public class ImageCreatorSharp : IDisposable
|
||||||
if (found )
|
if (found )
|
||||||
{
|
{
|
||||||
var intOrientation = rotation.Value.ToInt32();
|
var intOrientation = rotation.Value.ToInt32();
|
||||||
_orientation = (ExifReader.Orientations)intOrientation;
|
_orientation = (Orientations)intOrientation;
|
||||||
}
|
}
|
||||||
|
|
||||||
IExifValue<string> date = null;
|
IExifValue<string> date = null;
|
||||||
|
|
@ -191,16 +189,16 @@ public class ImageCreatorSharp : IDisposable
|
||||||
|
|
||||||
switch (_orientation /*DatiExif.Orientation*/)
|
switch (_orientation /*DatiExif.Orientation*/)
|
||||||
{
|
{
|
||||||
case ExifReader.Orientations.BottomLeft:
|
case Orientations.BottomLeft:
|
||||||
case ExifReader.Orientations.BottomRight:
|
case Orientations.BottomRight:
|
||||||
case ExifReader.Orientations.LeftTop:
|
case Orientations.LeftTop:
|
||||||
case ExifReader.Orientations.LftBottom:
|
case Orientations.LftBottom:
|
||||||
FotoRuotaASinistra = true;
|
FotoRuotaASinistra = true;
|
||||||
break;
|
break;
|
||||||
case ExifReader.Orientations.RightBottom:
|
case Orientations.RightBottom:
|
||||||
case ExifReader.Orientations.RightTop:
|
case Orientations.RightTop:
|
||||||
case ExifReader.Orientations.TopLeft:
|
case Orientations.TopLeft:
|
||||||
case ExifReader.Orientations.TopRight:
|
case Orientations.TopRight:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -422,7 +420,7 @@ public class ImageCreatorSharp : IDisposable
|
||||||
StrFormat1.Alignment = StringAlignment.Center;
|
StrFormat1.Alignment = StringAlignment.Center;
|
||||||
|
|
||||||
SolidBrush semiTransBrush21 = new SolidBrush(Color.FromArgb(alphaScelta, 0, 0, 0));
|
SolidBrush semiTransBrush21 = new SolidBrush(Color.FromArgb(alphaScelta, 0, 0, 0));
|
||||||
SolidBrush semiTransBrush1 = new SolidBrush(Color.FromArgb(alphaScelta, PicSettings.fontColoreRGB));
|
SolidBrush semiTransBrush1 = new SolidBrush(Color.FromArgb(alphaScelta, PicSettings.FontColoreRGB));
|
||||||
|
|
||||||
// quick fix
|
// quick fix
|
||||||
DimensioneStandardMiniatura = PicSettings.DimMin;
|
DimensioneStandardMiniatura = PicSettings.DimMin;
|
||||||
|
|
@ -608,7 +606,7 @@ public class ImageCreatorSharp : IDisposable
|
||||||
|
|
||||||
SolidBrush semiTransBrush2 = new SolidBrush(Color.FromArgb(alphaScelta, 0, 0, 0));
|
SolidBrush semiTransBrush2 = new SolidBrush(Color.FromArgb(alphaScelta, 0, 0, 0));
|
||||||
// Dim semiTransBrush As SolidBrush = New SolidBrush(Color.FromArgb(AlphaScelta, _FontColoreR, _FontColoreG, _FontColoreB))
|
// Dim semiTransBrush As SolidBrush = New SolidBrush(Color.FromArgb(AlphaScelta, _FontColoreR, _FontColoreG, _FontColoreB))
|
||||||
SolidBrush semiTransBrush = new SolidBrush(Color.FromArgb(alphaScelta, PicSettings.fontColoreRGB));
|
SolidBrush semiTransBrush = new SolidBrush(Color.FromArgb(alphaScelta, PicSettings.FontColoreRGB));
|
||||||
|
|
||||||
if (FotoRuotaADestra | FotoRuotaASinistra)
|
if (FotoRuotaADestra | FotoRuotaASinistra)
|
||||||
{
|
{
|
||||||
|
|
@ -800,7 +798,7 @@ public class ImageCreatorSharp : IDisposable
|
||||||
thumbSizeBig = g2.Width > g2.Height ? NewthumbSize(g2.Width, g2.Height, PicSettings.LarghezzaBig, "Larghezza") : NewthumbSize(g2.Width, g2.Height, PicSettings.AltezzaBig, "Altezza");
|
thumbSizeBig = g2.Width > g2.Height ? NewthumbSize(g2.Width, g2.Height, PicSettings.LarghezzaBig, "Larghezza") : NewthumbSize(g2.Width, g2.Height, PicSettings.AltezzaBig, "Altezza");
|
||||||
using Bitmap imgOutputBig2 = new Bitmap(g2, thumbSizeBig.Width, thumbSizeBig.Height);
|
using Bitmap imgOutputBig2 = new Bitmap(g2, thumbSizeBig.Width, thumbSizeBig.Height);
|
||||||
if (thisFormat.Equals(ImageFormat.Jpeg))
|
if (thisFormat.Equals(ImageFormat.Jpeg))
|
||||||
SalvaImmagineCustomQuality(imgOutputBig2, Path.Combine(DestDir.FullName, NomeFileBig), PicSettings.jpegQuality);
|
SalvaImmagineCustomQuality(imgOutputBig2, Path.Combine(DestDir.FullName, NomeFileBig), PicSettings.JpegQuality);
|
||||||
else
|
else
|
||||||
imgOutputBig2.Save(Path.Combine(DestDir.FullName, NomeFileBig), thisFormat);
|
imgOutputBig2.Save(Path.Combine(DestDir.FullName, NomeFileBig), thisFormat);
|
||||||
|
|
||||||
|
|
@ -813,7 +811,7 @@ public class ImageCreatorSharp : IDisposable
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
if (thisFormat.Equals(ImageFormat.Jpeg))
|
if (thisFormat.Equals(ImageFormat.Jpeg))
|
||||||
SalvaImmagineCustomQuality(imgOutputBig, Path.Combine(DestDir.FullName, NomeFileBig), PicSettings.jpegQuality);
|
SalvaImmagineCustomQuality(imgOutputBig, Path.Combine(DestDir.FullName, NomeFileBig), PicSettings.JpegQuality);
|
||||||
else
|
else
|
||||||
imgOutputBig.Save(Path.Combine(DestDir.FullName, NomeFileBig), thisFormat);
|
imgOutputBig.Save(Path.Combine(DestDir.FullName, NomeFileBig), thisFormat);
|
||||||
|
|
||||||
|
|
@ -837,7 +835,7 @@ public class ImageCreatorSharp : IDisposable
|
||||||
NomeFileSmall = NomeFileSmall.Substring(0, NomeFileSmall.Length - 4) + PicSettings.Codice + NomeFileSmall.Substring(NomeFileSmall.Length - 4);
|
NomeFileSmall = NomeFileSmall.Substring(0, NomeFileSmall.Length - 4) + PicSettings.Codice + NomeFileSmall.Substring(NomeFileSmall.Length - 4);
|
||||||
//
|
//
|
||||||
if (thisFormat.Equals(ImageFormat.Jpeg))
|
if (thisFormat.Equals(ImageFormat.Jpeg))
|
||||||
SalvaImmagineCustomQuality(imgOutputSmall, Path.Combine(DestDir.FullName, NomeFileSmall), PicSettings.jpegQualityMin);
|
SalvaImmagineCustomQuality(imgOutputSmall, Path.Combine(DestDir.FullName, NomeFileSmall), PicSettings.JpegQualityMin);
|
||||||
else
|
else
|
||||||
imgOutputSmall.Save(Path.Combine(_DestDir.FullName, NomeFileSmall), thisFormat);
|
imgOutputSmall.Save(Path.Combine(_DestDir.FullName, NomeFileSmall), thisFormat);
|
||||||
|
|
||||||
|
|
@ -858,7 +856,7 @@ public class ImageCreatorSharp : IDisposable
|
||||||
|
|
||||||
EncoderParameters MyEncoderParameters = new EncoderParameters(1);
|
EncoderParameters MyEncoderParameters = new EncoderParameters(1);
|
||||||
|
|
||||||
EncoderParameter MyEncoderParameter = new EncoderParameter(MyEncoder, PicSettings.jpegQuality);
|
EncoderParameter MyEncoderParameter = new EncoderParameter(MyEncoder, PicSettings.JpegQuality);
|
||||||
MyEncoderParameters.Param[0] = MyEncoderParameter;
|
MyEncoderParameters.Param[0] = MyEncoderParameter;
|
||||||
imageToSave.Save(nomeFileFinale, JgpEncoder, MyEncoderParameters);
|
imageToSave.Save(nomeFileFinale, JgpEncoder, MyEncoderParameters);
|
||||||
//imageToSave.Dispose();
|
//imageToSave.Dispose();
|
||||||
|
|
@ -871,7 +869,7 @@ public class ImageCreatorSharp : IDisposable
|
||||||
|
|
||||||
EncoderParameters MyEncoderParameters = new EncoderParameters(1);
|
EncoderParameters MyEncoderParameters = new EncoderParameters(1);
|
||||||
|
|
||||||
EncoderParameter MyEncoderParameter = new EncoderParameter(MyEncoder, PicSettings.jpegQuality);
|
EncoderParameter MyEncoderParameter = new EncoderParameter(MyEncoder, PicSettings.JpegQuality);
|
||||||
MyEncoderParameters.Param[0] = MyEncoderParameter;
|
MyEncoderParameters.Param[0] = MyEncoderParameter;
|
||||||
destinationStream.Seek(0, SeekOrigin.Begin);
|
destinationStream.Seek(0, SeekOrigin.Begin);
|
||||||
imageToSave.Save(destinationStream, JgpEncoder, MyEncoderParameters);
|
imageToSave.Save(destinationStream, JgpEncoder, MyEncoderParameters);
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,6 @@
|
||||||
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
|
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\CatalogVbLib\CatalogVbLib.vbproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="AsyncEnumerator" Version="4.0.2" />
|
<PackageReference Include="AsyncEnumerator" Version="4.0.2" />
|
||||||
<PackageReference Include="Ben.Demystifier" Version="0.4.1" />
|
<PackageReference Include="Ben.Demystifier" Version="0.4.1" />
|
||||||
|
|
|
||||||
13
MaddoShared/Orientations.cs
Normal file
13
MaddoShared/Orientations.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
namespace MaddoShared;
|
||||||
|
|
||||||
|
public enum Orientations
|
||||||
|
{
|
||||||
|
TopLeft = 1,
|
||||||
|
TopRight = 2,
|
||||||
|
BottomRight = 3,
|
||||||
|
BottomLeft = 4,
|
||||||
|
LeftTop = 5,
|
||||||
|
RightTop = 6,
|
||||||
|
RightBottom = 7,
|
||||||
|
LftBottom = 8,
|
||||||
|
}
|
||||||
67
MaddoShared/PicSettings.cs
Normal file
67
MaddoShared/PicSettings.cs
Normal file
|
|
@ -0,0 +1,67 @@
|
||||||
|
using System;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.IO;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace MaddoShared;
|
||||||
|
|
||||||
|
public static class PicSettings
|
||||||
|
{
|
||||||
|
public static string DirectorySorgente { get; set; }
|
||||||
|
public static string DirectoryDestinazione { get; set; }
|
||||||
|
public static string TestoFirmaStart { get; set; }
|
||||||
|
public static string TestoFirmaStartV { get; set; }
|
||||||
|
public static DateTime DataPartenza { get; set; }
|
||||||
|
public static string TestoOrario { get; set; }
|
||||||
|
public static int DimStandard { get; set; }
|
||||||
|
public static int DimStandardMiniatura { get; set; }
|
||||||
|
public static bool NomeData { get; set; }
|
||||||
|
public static bool TestoNome { get; set; }
|
||||||
|
public static bool UsaOrarioMiniatura { get; set; }
|
||||||
|
public static bool UsaOrarioTestoApplicare { get; set; }
|
||||||
|
public static bool UsaTempoGaraTestoApplicare { get; set; }
|
||||||
|
public static bool UsaRotazioneAutomatica { get; set; }
|
||||||
|
public static bool UsaForzaJpg { get; set; }
|
||||||
|
public static int LarghezzaSmall { get; set; }
|
||||||
|
public static int AltezzaSmall { get; set; }
|
||||||
|
public static bool CreaMiniature { get; set; }
|
||||||
|
public static bool AggiungiScritteMiniature { get; set; }
|
||||||
|
public static string Suffisso { get; set; }
|
||||||
|
public static string Codice { get; set; }
|
||||||
|
public static int Trasparenza { get; set; }
|
||||||
|
public static string IlFont { get; set; }
|
||||||
|
public static bool Grassetto { get; set; }
|
||||||
|
public static string Posizione { get; set; }
|
||||||
|
public static string Allineamento { get; set; }
|
||||||
|
public static int Margine { get; set; }
|
||||||
|
public static int LogoAltezza { get; set; }
|
||||||
|
public static int LogoLarghezza { get; set; }
|
||||||
|
public static Color FontColoreRGB { get; set; }
|
||||||
|
public static bool LogoAggiungi { get; set; }
|
||||||
|
public static string LogoNomeFile { get; set; }
|
||||||
|
public static string LogoTrasparenza { get; set; }
|
||||||
|
public static string LogoMargine { get; set; }
|
||||||
|
public static string LogoPosizioneH { get; set; }
|
||||||
|
public static string LogoPosizioneV { get; set; }
|
||||||
|
public static bool FotoGrandeDimOrigina { get; set; }
|
||||||
|
public static int AltezzaBig { get; set; }
|
||||||
|
public static int LarghezzaBig { get; set; }
|
||||||
|
public static DirectoryInfo DestDir { get; set; }
|
||||||
|
public static int DimVert { get; set; }
|
||||||
|
public static int MargVert { get; set; }
|
||||||
|
public static bool TestoMin { get; set; }
|
||||||
|
public static int DimMin { get; set; }
|
||||||
|
public static bool SecretDefault { get; set; }
|
||||||
|
public static bool SecretBig { get; set; }
|
||||||
|
public static bool SecretSmall { get; set; }
|
||||||
|
public static string SecretPathSmall { get; set; }
|
||||||
|
public static string SecretPathBig { get; set; }
|
||||||
|
public static bool AggTempoGaraMin { get; set; }
|
||||||
|
public static bool AggNumTempMin { get; set; }
|
||||||
|
public static long JpegQuality { get; set; }
|
||||||
|
public static long JpegQualityMin { get; set; }
|
||||||
|
|
||||||
|
public static bool FotoRuotaADestra { get; set; } = false;
|
||||||
|
public static bool FotoRuotaASinistra { get; set; } = false;
|
||||||
|
public static string TempMinText { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
|
@ -36,7 +36,6 @@
|
||||||
<Folder Include="Sorgenti\" />
|
<Folder Include="Sorgenti\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\CatalogVbLib\CatalogVbLib.vbproj" />
|
|
||||||
<ProjectReference Include="..\MaddoShared\MaddoShared.csproj" />
|
<ProjectReference Include="..\MaddoShared\MaddoShared.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using CatalogVbLib;
|
|
||||||
using ImageCatalog_2;
|
using ImageCatalog_2;
|
||||||
using ImageCatalog_2.Services;
|
using ImageCatalog_2.Services;
|
||||||
using MaddoShared;
|
using MaddoShared;
|
||||||
|
|
@ -636,7 +635,7 @@ public partial class MainForm
|
||||||
PicSettings.Margine = int.Parse(TextBox12.Text);
|
PicSettings.Margine = int.Parse(TextBox12.Text);
|
||||||
PicSettings.LogoAltezza = int.Parse(TextBox14.Text);
|
PicSettings.LogoAltezza = int.Parse(TextBox14.Text);
|
||||||
PicSettings.LogoLarghezza = int.Parse(TextBox15.Text);
|
PicSettings.LogoLarghezza = int.Parse(TextBox15.Text);
|
||||||
PicSettings.fontColoreRGB = ColorTranslator.FromHtml(TextBox34.Text);
|
PicSettings.FontColoreRGB = ColorTranslator.FromHtml(TextBox34.Text);
|
||||||
PicSettings.LogoAggiungi = CheckBox5.Checked;
|
PicSettings.LogoAggiungi = CheckBox5.Checked;
|
||||||
PicSettings.LogoNomeFile = TextBox10.Text;
|
PicSettings.LogoNomeFile = TextBox10.Text;
|
||||||
PicSettings.LogoTrasparenza = TextBox19.Text;
|
PicSettings.LogoTrasparenza = TextBox19.Text;
|
||||||
|
|
@ -648,9 +647,8 @@ public partial class MainForm
|
||||||
PicSettings.LarghezzaBig = int.Parse(TextBox28.Text);
|
PicSettings.LarghezzaBig = int.Parse(TextBox28.Text);
|
||||||
PicSettings.DimMin = int.Parse(TextBox25.Text);
|
PicSettings.DimMin = int.Parse(TextBox25.Text);
|
||||||
PicSettings.TestoMin = RadioButton6.Checked;
|
PicSettings.TestoMin = RadioButton6.Checked;
|
||||||
PicSettings.jpegQuality = int.Parse(TextBox32.Text);
|
PicSettings.JpegQuality = int.Parse(TextBox32.Text);
|
||||||
PicSettings.jpegQualityMin = int.Parse(TextBox33.Text);
|
PicSettings.JpegQualityMin = int.Parse(TextBox33.Text);
|
||||||
PicSettings.mainForm = this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<List<FileInfo>> makeFilesList(string SourcePath)
|
private List<List<FileInfo>> makeFilesList(string SourcePath)
|
||||||
|
|
|
||||||
|
|
@ -1,602 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
// Module PicSettings
|
|
||||||
|
|
||||||
// Private _DirectorySorgente As String
|
|
||||||
// Private _DirectoryDestinazione As String
|
|
||||||
|
|
||||||
// Private _DimVert As Integer
|
|
||||||
// Private _MargVert As Integer
|
|
||||||
|
|
||||||
|
|
||||||
// Private _DimStandard As Integer
|
|
||||||
// Private _DimStandardMiniatura As Integer
|
|
||||||
|
|
||||||
// Private _NomeData As Boolean
|
|
||||||
// Private _TestoNome As Boolean
|
|
||||||
// Private _UsaOrarioMiniatura As Boolean
|
|
||||||
// Private _UsaOrarioTestoApplicare As Boolean
|
|
||||||
// Private _UsaTempoGaraTestoApplicare As Boolean
|
|
||||||
// Private _TestoFirmaStart As String
|
|
||||||
// Private _TestoFirmaStartV As String
|
|
||||||
// Private _DataPartenza As DateTime
|
|
||||||
// Private _TestoOrario As String
|
|
||||||
|
|
||||||
// Private _UsaRotazioneAutomatica As Boolean
|
|
||||||
// Private _UsaForzaJpg As Boolean
|
|
||||||
|
|
||||||
// Private _LarghezzaSmall As Integer
|
|
||||||
// Private _AltezzaSmall As Integer
|
|
||||||
|
|
||||||
// Private _CreaMiniature As Boolean
|
|
||||||
// Private _AggiungiScritteMiniature As Boolean
|
|
||||||
// Private _AggTempoGaraMin As Boolean
|
|
||||||
// Private _AggNumTempMin As Boolean
|
|
||||||
|
|
||||||
// Private _Suffisso As String
|
|
||||||
// Private _Codice As String
|
|
||||||
|
|
||||||
// Private _Trasparenza As Integer
|
|
||||||
// Private _IlFont As String
|
|
||||||
// Private _Grassetto As Boolean
|
|
||||||
|
|
||||||
// Private _Posizione As String
|
|
||||||
// Private _Allineamento As String
|
|
||||||
// Private _Margine As Integer
|
|
||||||
|
|
||||||
// Private _LogoAltezza As Integer
|
|
||||||
// Private _LogoLarghezza As Integer
|
|
||||||
|
|
||||||
// Private _fontColoreRGB As Color
|
|
||||||
|
|
||||||
// Private _LogoAggiungi As Boolean
|
|
||||||
// Private _LogoNomeFile As String
|
|
||||||
// Private _LogoTrasparenza As String
|
|
||||||
// Private _LogoMargine As String
|
|
||||||
// Private _LogoPosizioneH As String
|
|
||||||
// Private _LogoPosizioneV As String
|
|
||||||
|
|
||||||
// Private _FotoGrandeDimOrigina As Boolean
|
|
||||||
// Private _AltezzaBig As Integer
|
|
||||||
// Private _LarghezzaBig As Integer
|
|
||||||
// Private _DestDir As DirectoryInfo
|
|
||||||
// Private _DimMin As Integer
|
|
||||||
|
|
||||||
// Private _TestoMin As Boolean
|
|
||||||
|
|
||||||
// Private _SecretDefault As Boolean
|
|
||||||
// Private _SecretBig As Boolean
|
|
||||||
// Private _SecretSmall As Boolean
|
|
||||||
|
|
||||||
// Private _SecretPathSmall As String
|
|
||||||
// Private _SecretPathBig As String
|
|
||||||
|
|
||||||
// Private _jpegQuality As Long
|
|
||||||
// Private _jpegQualityMin As Long
|
|
||||||
|
|
||||||
// Private FotoRuotaADestra As Boolean = False
|
|
||||||
// Private FotoRuotaASinistra As Boolean = False
|
|
||||||
|
|
||||||
// Private TempMinText As String = ""
|
|
||||||
|
|
||||||
// Private _mainForm As MainForm
|
|
||||||
|
|
||||||
// 'Private progressBar As System.Windows.Forms.ProgressBar
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Public Property mainForm() As MainForm
|
|
||||||
// Get
|
|
||||||
// Return _mainForm
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As MainForm)
|
|
||||||
// _mainForm = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property DirectorySorgente() As String
|
|
||||||
// Get
|
|
||||||
// Return _DirectorySorgente
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As String)
|
|
||||||
// _DirectorySorgente = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property DirectoryDestinazione() As String
|
|
||||||
// Get
|
|
||||||
// Return _DirectoryDestinazione
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As String)
|
|
||||||
// _DirectoryDestinazione = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property TestoFirmaStart() As String
|
|
||||||
// Get
|
|
||||||
// Return _TestoFirmaStart
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As String)
|
|
||||||
// _TestoFirmaStart = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property TestoFirmaStartV() As String
|
|
||||||
// Get
|
|
||||||
// Return _TestoFirmaStartV
|
|
||||||
// End Get
|
|
||||||
|
|
||||||
// Set(ByVal value As String)
|
|
||||||
// _TestoFirmaStartV = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property DataPartenza() As DateTime
|
|
||||||
// Get
|
|
||||||
// Return _DataPartenza
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As DateTime)
|
|
||||||
// _DataPartenza = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property TestoOrario() As String
|
|
||||||
// Get
|
|
||||||
// Return _TestoOrario
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As String)
|
|
||||||
// _TestoOrario = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property DimStandard() As Integer
|
|
||||||
// Get
|
|
||||||
// Return _DimStandard
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Integer)
|
|
||||||
// _DimStandard = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property DimStandardMiniatura() As Integer
|
|
||||||
// Get
|
|
||||||
// Return _DimStandardMiniatura
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Integer)
|
|
||||||
// _DimStandardMiniatura = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property NomeData() As Boolean
|
|
||||||
// Get
|
|
||||||
// Return _NomeData
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Boolean)
|
|
||||||
// _NomeData = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property TestoNome() As Boolean
|
|
||||||
// Get
|
|
||||||
// Return _TestoNome
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Boolean)
|
|
||||||
// _TestoNome = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property UsaOrarioMiniatura() As Boolean
|
|
||||||
// Get
|
|
||||||
// Return _UsaOrarioMiniatura
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Boolean)
|
|
||||||
// _UsaOrarioMiniatura = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property UsaOrarioTestoApplicare() As Boolean
|
|
||||||
// Get
|
|
||||||
// Return _UsaOrarioTestoApplicare
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Boolean)
|
|
||||||
// _UsaOrarioTestoApplicare = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property UsaTempoGaraTestoApplicare() As Boolean
|
|
||||||
// Get
|
|
||||||
// Return _UsaTempoGaraTestoApplicare
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Boolean)
|
|
||||||
// _UsaTempoGaraTestoApplicare = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property UsaRotazioneAutomatica() As Boolean
|
|
||||||
// Get
|
|
||||||
// Return _UsaRotazioneAutomatica
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Boolean)
|
|
||||||
// _UsaRotazioneAutomatica = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property UsaForzaJpg() As Boolean
|
|
||||||
// Get
|
|
||||||
// Return _UsaForzaJpg
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Boolean)
|
|
||||||
// _UsaForzaJpg = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Public Property LarghezzaSmall() As Integer
|
|
||||||
// Get
|
|
||||||
// Return _LarghezzaSmall
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Integer)
|
|
||||||
// _LarghezzaSmall = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property AltezzaSmall() As Integer
|
|
||||||
// Get
|
|
||||||
// Return _AltezzaSmall
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Integer)
|
|
||||||
// _AltezzaSmall = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
|
|
||||||
// Public Property CreaMiniature() As Boolean
|
|
||||||
// Get
|
|
||||||
// Return _CreaMiniature
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Boolean)
|
|
||||||
// _CreaMiniature = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property AggiungiScritteMiniature() As Boolean
|
|
||||||
// Get
|
|
||||||
// Return _AggiungiScritteMiniature
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Boolean)
|
|
||||||
// _AggiungiScritteMiniature = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
|
|
||||||
// Public Property Suffisso() As String
|
|
||||||
// Get
|
|
||||||
// Return _Suffisso
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As String)
|
|
||||||
// _Suffisso = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property Codice() As String
|
|
||||||
// Get
|
|
||||||
// Return _Codice
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As String)
|
|
||||||
// _Codice = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
|
|
||||||
// Public Property Trasparenza() As Integer
|
|
||||||
// Get
|
|
||||||
// Return _Trasparenza
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Integer)
|
|
||||||
// _Trasparenza = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property IlFont() As String
|
|
||||||
// Get
|
|
||||||
// Return _IlFont
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As String)
|
|
||||||
// _IlFont = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property Grassetto() As Boolean
|
|
||||||
// Get
|
|
||||||
// Return _Grassetto
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Boolean)
|
|
||||||
// _Grassetto = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property Posizione() As String
|
|
||||||
// Get
|
|
||||||
// Return _Posizione
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As String)
|
|
||||||
// _Posizione = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property Allineamento() As String
|
|
||||||
// Get
|
|
||||||
// Return _Allineamento
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As String)
|
|
||||||
// _Allineamento = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property Margine() As Integer
|
|
||||||
// Get
|
|
||||||
// Return _Margine
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Integer)
|
|
||||||
// _Margine = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property LogoAltezza() As Integer
|
|
||||||
// Get
|
|
||||||
// Return _LogoAltezza
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Integer)
|
|
||||||
// _LogoAltezza = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property LogoLarghezza() As Integer
|
|
||||||
// Get
|
|
||||||
// Return _LogoLarghezza
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Integer)
|
|
||||||
// _LogoLarghezza = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property fontColoreRGB() As Color
|
|
||||||
// Get
|
|
||||||
// Return _fontColoreRGB
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Color)
|
|
||||||
// _fontColoreRGB = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property LogoAggiungi() As Boolean
|
|
||||||
// Get
|
|
||||||
// Return _LogoAggiungi
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Boolean)
|
|
||||||
// _LogoAggiungi = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property LogoNomeFile() As String
|
|
||||||
// Get
|
|
||||||
// Return _LogoNomeFile
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As String)
|
|
||||||
// _LogoNomeFile = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property LogoTrasparenza() As String
|
|
||||||
// Get
|
|
||||||
// Return _LogoTrasparenza
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As String)
|
|
||||||
// _LogoTrasparenza = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property LogoMargine() As String
|
|
||||||
// Get
|
|
||||||
// Return _LogoMargine
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As String)
|
|
||||||
// _LogoMargine = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property LogoPosizioneH() As String
|
|
||||||
// Get
|
|
||||||
// Return _LogoPosizioneH
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As String)
|
|
||||||
// _LogoPosizioneH = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property LogoPosizioneV() As String
|
|
||||||
// Get
|
|
||||||
// Return _LogoPosizioneV
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As String)
|
|
||||||
// _LogoPosizioneV = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property FotoGrandeDimOrigina() As Boolean
|
|
||||||
// Get
|
|
||||||
// Return _FotoGrandeDimOrigina
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Boolean)
|
|
||||||
// _FotoGrandeDimOrigina = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property AltezzaBig() As Integer
|
|
||||||
// Get
|
|
||||||
// Return _AltezzaBig
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Integer)
|
|
||||||
// _AltezzaBig = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property LarghezzaBig() As Integer
|
|
||||||
// Get
|
|
||||||
// Return _LarghezzaBig
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Integer)
|
|
||||||
// _LarghezzaBig = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property DestDir() As DirectoryInfo
|
|
||||||
// Get
|
|
||||||
// Return _DestDir
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As DirectoryInfo)
|
|
||||||
// _DestDir = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property DimVert() As Integer
|
|
||||||
// Get
|
|
||||||
// Return _DimVert
|
|
||||||
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Integer)
|
|
||||||
// _DimVert = value
|
|
||||||
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property MargVert() As Integer
|
|
||||||
// Get
|
|
||||||
// Return _MargVert
|
|
||||||
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Integer)
|
|
||||||
// _MargVert = value
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property TestoMin() As Boolean
|
|
||||||
// Get
|
|
||||||
// Return _TestoMin
|
|
||||||
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Boolean)
|
|
||||||
// _TestoMin = value
|
|
||||||
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property DimMin() As Integer
|
|
||||||
// Get
|
|
||||||
// Return _DimMin
|
|
||||||
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Integer)
|
|
||||||
// _DimMin = value
|
|
||||||
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property SecretDefault() As Boolean
|
|
||||||
// Get
|
|
||||||
// Return _SecretDefault
|
|
||||||
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Boolean)
|
|
||||||
// _SecretDefault = value
|
|
||||||
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property SecretBig() As Boolean
|
|
||||||
// Get
|
|
||||||
// Return _SecretBig
|
|
||||||
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Boolean)
|
|
||||||
// _SecretBig = value
|
|
||||||
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property SecretSmall() As Boolean
|
|
||||||
// Get
|
|
||||||
// Return _SecretSmall
|
|
||||||
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Boolean)
|
|
||||||
// _SecretSmall = value
|
|
||||||
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property SecretPathSmall() As String
|
|
||||||
// Get
|
|
||||||
// Return _SecretPathSmall
|
|
||||||
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As String)
|
|
||||||
// _SecretPathSmall = value
|
|
||||||
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property SecretPathBig() As String
|
|
||||||
// Get
|
|
||||||
// Return _SecretPathBig
|
|
||||||
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As String)
|
|
||||||
// _SecretPathBig = value
|
|
||||||
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property AggTempoGaraMin() As Boolean
|
|
||||||
// Get
|
|
||||||
// Return _AggTempoGaraMin
|
|
||||||
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Boolean)
|
|
||||||
// _AggTempoGaraMin = value
|
|
||||||
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property AggNumTempMin() As Boolean
|
|
||||||
// Get
|
|
||||||
// Return _AggNumTempMin
|
|
||||||
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Boolean)
|
|
||||||
// _AggNumTempMin = value
|
|
||||||
|
|
||||||
// End Set
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property jpegQuality() As Long
|
|
||||||
// Get
|
|
||||||
// Return _jpegQuality
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Long)
|
|
||||||
// _jpegQuality = value
|
|
||||||
// End Set
|
|
||||||
|
|
||||||
// End Property
|
|
||||||
|
|
||||||
// Public Property jpegQualityMin() As Long
|
|
||||||
// Get
|
|
||||||
// Return _jpegQualityMin
|
|
||||||
// End Get
|
|
||||||
// Set(ByVal value As Long)
|
|
||||||
// _jpegQualityMin = value
|
|
||||||
// End Set
|
|
||||||
|
|
||||||
// End Property
|
|
||||||
// End Module
|
|
||||||
|
|
@ -1,604 +0,0 @@
|
||||||
Imports System.IO
|
|
||||||
Imports System.Drawing.Drawing2D
|
|
||||||
Imports System.Drawing.Imaging
|
|
||||||
|
|
||||||
'Module PicSettings
|
|
||||||
|
|
||||||
' Private _DirectorySorgente As String
|
|
||||||
' Private _DirectoryDestinazione As String
|
|
||||||
|
|
||||||
' Private _DimVert As Integer
|
|
||||||
' Private _MargVert As Integer
|
|
||||||
|
|
||||||
|
|
||||||
' Private _DimStandard As Integer
|
|
||||||
' Private _DimStandardMiniatura As Integer
|
|
||||||
|
|
||||||
' Private _NomeData As Boolean
|
|
||||||
' Private _TestoNome As Boolean
|
|
||||||
' Private _UsaOrarioMiniatura As Boolean
|
|
||||||
' Private _UsaOrarioTestoApplicare As Boolean
|
|
||||||
' Private _UsaTempoGaraTestoApplicare As Boolean
|
|
||||||
' Private _TestoFirmaStart As String
|
|
||||||
' Private _TestoFirmaStartV As String
|
|
||||||
' Private _DataPartenza As DateTime
|
|
||||||
' Private _TestoOrario As String
|
|
||||||
|
|
||||||
' Private _UsaRotazioneAutomatica As Boolean
|
|
||||||
' Private _UsaForzaJpg As Boolean
|
|
||||||
|
|
||||||
' Private _LarghezzaSmall As Integer
|
|
||||||
' Private _AltezzaSmall As Integer
|
|
||||||
|
|
||||||
' Private _CreaMiniature As Boolean
|
|
||||||
' Private _AggiungiScritteMiniature As Boolean
|
|
||||||
' Private _AggTempoGaraMin As Boolean
|
|
||||||
' Private _AggNumTempMin As Boolean
|
|
||||||
|
|
||||||
' Private _Suffisso As String
|
|
||||||
' Private _Codice As String
|
|
||||||
|
|
||||||
' Private _Trasparenza As Integer
|
|
||||||
' Private _IlFont As String
|
|
||||||
' Private _Grassetto As Boolean
|
|
||||||
|
|
||||||
' Private _Posizione As String
|
|
||||||
' Private _Allineamento As String
|
|
||||||
' Private _Margine As Integer
|
|
||||||
|
|
||||||
' Private _LogoAltezza As Integer
|
|
||||||
' Private _LogoLarghezza As Integer
|
|
||||||
|
|
||||||
' Private _fontColoreRGB As Color
|
|
||||||
|
|
||||||
' Private _LogoAggiungi As Boolean
|
|
||||||
' Private _LogoNomeFile As String
|
|
||||||
' Private _LogoTrasparenza As String
|
|
||||||
' Private _LogoMargine As String
|
|
||||||
' Private _LogoPosizioneH As String
|
|
||||||
' Private _LogoPosizioneV As String
|
|
||||||
|
|
||||||
' Private _FotoGrandeDimOrigina As Boolean
|
|
||||||
' Private _AltezzaBig As Integer
|
|
||||||
' Private _LarghezzaBig As Integer
|
|
||||||
' Private _DestDir As DirectoryInfo
|
|
||||||
' Private _DimMin As Integer
|
|
||||||
|
|
||||||
' Private _TestoMin As Boolean
|
|
||||||
|
|
||||||
' Private _SecretDefault As Boolean
|
|
||||||
' Private _SecretBig As Boolean
|
|
||||||
' Private _SecretSmall As Boolean
|
|
||||||
|
|
||||||
' Private _SecretPathSmall As String
|
|
||||||
' Private _SecretPathBig As String
|
|
||||||
|
|
||||||
' Private _jpegQuality As Long
|
|
||||||
' Private _jpegQualityMin As Long
|
|
||||||
|
|
||||||
' Private FotoRuotaADestra As Boolean = False
|
|
||||||
' Private FotoRuotaASinistra As Boolean = False
|
|
||||||
|
|
||||||
' Private TempMinText As String = ""
|
|
||||||
|
|
||||||
' Private _mainForm As MainForm
|
|
||||||
|
|
||||||
' 'Private progressBar As System.Windows.Forms.ProgressBar
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
' Public Property mainForm() As MainForm
|
|
||||||
' Get
|
|
||||||
' Return _mainForm
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As MainForm)
|
|
||||||
' _mainForm = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property DirectorySorgente() As String
|
|
||||||
' Get
|
|
||||||
' Return _DirectorySorgente
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As String)
|
|
||||||
' _DirectorySorgente = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property DirectoryDestinazione() As String
|
|
||||||
' Get
|
|
||||||
' Return _DirectoryDestinazione
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As String)
|
|
||||||
' _DirectoryDestinazione = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property TestoFirmaStart() As String
|
|
||||||
' Get
|
|
||||||
' Return _TestoFirmaStart
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As String)
|
|
||||||
' _TestoFirmaStart = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property TestoFirmaStartV() As String
|
|
||||||
' Get
|
|
||||||
' Return _TestoFirmaStartV
|
|
||||||
' End Get
|
|
||||||
|
|
||||||
' Set(ByVal value As String)
|
|
||||||
' _TestoFirmaStartV = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property DataPartenza() As DateTime
|
|
||||||
' Get
|
|
||||||
' Return _DataPartenza
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As DateTime)
|
|
||||||
' _DataPartenza = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property TestoOrario() As String
|
|
||||||
' Get
|
|
||||||
' Return _TestoOrario
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As String)
|
|
||||||
' _TestoOrario = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property DimStandard() As Integer
|
|
||||||
' Get
|
|
||||||
' Return _DimStandard
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Integer)
|
|
||||||
' _DimStandard = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property DimStandardMiniatura() As Integer
|
|
||||||
' Get
|
|
||||||
' Return _DimStandardMiniatura
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Integer)
|
|
||||||
' _DimStandardMiniatura = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property NomeData() As Boolean
|
|
||||||
' Get
|
|
||||||
' Return _NomeData
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Boolean)
|
|
||||||
' _NomeData = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property TestoNome() As Boolean
|
|
||||||
' Get
|
|
||||||
' Return _TestoNome
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Boolean)
|
|
||||||
' _TestoNome = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property UsaOrarioMiniatura() As Boolean
|
|
||||||
' Get
|
|
||||||
' Return _UsaOrarioMiniatura
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Boolean)
|
|
||||||
' _UsaOrarioMiniatura = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property UsaOrarioTestoApplicare() As Boolean
|
|
||||||
' Get
|
|
||||||
' Return _UsaOrarioTestoApplicare
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Boolean)
|
|
||||||
' _UsaOrarioTestoApplicare = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property UsaTempoGaraTestoApplicare() As Boolean
|
|
||||||
' Get
|
|
||||||
' Return _UsaTempoGaraTestoApplicare
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Boolean)
|
|
||||||
' _UsaTempoGaraTestoApplicare = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property UsaRotazioneAutomatica() As Boolean
|
|
||||||
' Get
|
|
||||||
' Return _UsaRotazioneAutomatica
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Boolean)
|
|
||||||
' _UsaRotazioneAutomatica = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property UsaForzaJpg() As Boolean
|
|
||||||
' Get
|
|
||||||
' Return _UsaForzaJpg
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Boolean)
|
|
||||||
' _UsaForzaJpg = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
' Public Property LarghezzaSmall() As Integer
|
|
||||||
' Get
|
|
||||||
' Return _LarghezzaSmall
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Integer)
|
|
||||||
' _LarghezzaSmall = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property AltezzaSmall() As Integer
|
|
||||||
' Get
|
|
||||||
' Return _AltezzaSmall
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Integer)
|
|
||||||
' _AltezzaSmall = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
|
|
||||||
' Public Property CreaMiniature() As Boolean
|
|
||||||
' Get
|
|
||||||
' Return _CreaMiniature
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Boolean)
|
|
||||||
' _CreaMiniature = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property AggiungiScritteMiniature() As Boolean
|
|
||||||
' Get
|
|
||||||
' Return _AggiungiScritteMiniature
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Boolean)
|
|
||||||
' _AggiungiScritteMiniature = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
|
|
||||||
' Public Property Suffisso() As String
|
|
||||||
' Get
|
|
||||||
' Return _Suffisso
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As String)
|
|
||||||
' _Suffisso = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property Codice() As String
|
|
||||||
' Get
|
|
||||||
' Return _Codice
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As String)
|
|
||||||
' _Codice = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
|
|
||||||
' Public Property Trasparenza() As Integer
|
|
||||||
' Get
|
|
||||||
' Return _Trasparenza
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Integer)
|
|
||||||
' _Trasparenza = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property IlFont() As String
|
|
||||||
' Get
|
|
||||||
' Return _IlFont
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As String)
|
|
||||||
' _IlFont = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property Grassetto() As Boolean
|
|
||||||
' Get
|
|
||||||
' Return _Grassetto
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Boolean)
|
|
||||||
' _Grassetto = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property Posizione() As String
|
|
||||||
' Get
|
|
||||||
' Return _Posizione
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As String)
|
|
||||||
' _Posizione = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property Allineamento() As String
|
|
||||||
' Get
|
|
||||||
' Return _Allineamento
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As String)
|
|
||||||
' _Allineamento = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property Margine() As Integer
|
|
||||||
' Get
|
|
||||||
' Return _Margine
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Integer)
|
|
||||||
' _Margine = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property LogoAltezza() As Integer
|
|
||||||
' Get
|
|
||||||
' Return _LogoAltezza
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Integer)
|
|
||||||
' _LogoAltezza = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property LogoLarghezza() As Integer
|
|
||||||
' Get
|
|
||||||
' Return _LogoLarghezza
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Integer)
|
|
||||||
' _LogoLarghezza = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property fontColoreRGB() As Color
|
|
||||||
' Get
|
|
||||||
' Return _fontColoreRGB
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Color)
|
|
||||||
' _fontColoreRGB = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property LogoAggiungi() As Boolean
|
|
||||||
' Get
|
|
||||||
' Return _LogoAggiungi
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Boolean)
|
|
||||||
' _LogoAggiungi = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property LogoNomeFile() As String
|
|
||||||
' Get
|
|
||||||
' Return _LogoNomeFile
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As String)
|
|
||||||
' _LogoNomeFile = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property LogoTrasparenza() As String
|
|
||||||
' Get
|
|
||||||
' Return _LogoTrasparenza
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As String)
|
|
||||||
' _LogoTrasparenza = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property LogoMargine() As String
|
|
||||||
' Get
|
|
||||||
' Return _LogoMargine
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As String)
|
|
||||||
' _LogoMargine = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property LogoPosizioneH() As String
|
|
||||||
' Get
|
|
||||||
' Return _LogoPosizioneH
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As String)
|
|
||||||
' _LogoPosizioneH = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property LogoPosizioneV() As String
|
|
||||||
' Get
|
|
||||||
' Return _LogoPosizioneV
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As String)
|
|
||||||
' _LogoPosizioneV = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property FotoGrandeDimOrigina() As Boolean
|
|
||||||
' Get
|
|
||||||
' Return _FotoGrandeDimOrigina
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Boolean)
|
|
||||||
' _FotoGrandeDimOrigina = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property AltezzaBig() As Integer
|
|
||||||
' Get
|
|
||||||
' Return _AltezzaBig
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Integer)
|
|
||||||
' _AltezzaBig = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property LarghezzaBig() As Integer
|
|
||||||
' Get
|
|
||||||
' Return _LarghezzaBig
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Integer)
|
|
||||||
' _LarghezzaBig = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property DestDir() As DirectoryInfo
|
|
||||||
' Get
|
|
||||||
' Return _DestDir
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As DirectoryInfo)
|
|
||||||
' _DestDir = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property DimVert() As Integer
|
|
||||||
' Get
|
|
||||||
' Return _DimVert
|
|
||||||
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Integer)
|
|
||||||
' _DimVert = value
|
|
||||||
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property MargVert() As Integer
|
|
||||||
' Get
|
|
||||||
' Return _MargVert
|
|
||||||
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Integer)
|
|
||||||
' _MargVert = value
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property TestoMin() As Boolean
|
|
||||||
' Get
|
|
||||||
' Return _TestoMin
|
|
||||||
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Boolean)
|
|
||||||
' _TestoMin = value
|
|
||||||
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property DimMin() As Integer
|
|
||||||
' Get
|
|
||||||
' Return _DimMin
|
|
||||||
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Integer)
|
|
||||||
' _DimMin = value
|
|
||||||
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property SecretDefault() As Boolean
|
|
||||||
' Get
|
|
||||||
' Return _SecretDefault
|
|
||||||
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Boolean)
|
|
||||||
' _SecretDefault = value
|
|
||||||
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property SecretBig() As Boolean
|
|
||||||
' Get
|
|
||||||
' Return _SecretBig
|
|
||||||
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Boolean)
|
|
||||||
' _SecretBig = value
|
|
||||||
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property SecretSmall() As Boolean
|
|
||||||
' Get
|
|
||||||
' Return _SecretSmall
|
|
||||||
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Boolean)
|
|
||||||
' _SecretSmall = value
|
|
||||||
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property SecretPathSmall() As String
|
|
||||||
' Get
|
|
||||||
' Return _SecretPathSmall
|
|
||||||
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As String)
|
|
||||||
' _SecretPathSmall = value
|
|
||||||
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property SecretPathBig() As String
|
|
||||||
' Get
|
|
||||||
' Return _SecretPathBig
|
|
||||||
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As String)
|
|
||||||
' _SecretPathBig = value
|
|
||||||
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property AggTempoGaraMin() As Boolean
|
|
||||||
' Get
|
|
||||||
' Return _AggTempoGaraMin
|
|
||||||
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Boolean)
|
|
||||||
' _AggTempoGaraMin = value
|
|
||||||
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property AggNumTempMin() As Boolean
|
|
||||||
' Get
|
|
||||||
' Return _AggNumTempMin
|
|
||||||
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Boolean)
|
|
||||||
' _AggNumTempMin = value
|
|
||||||
|
|
||||||
' End Set
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property jpegQuality() As Long
|
|
||||||
' Get
|
|
||||||
' Return _jpegQuality
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Long)
|
|
||||||
' _jpegQuality = value
|
|
||||||
' End Set
|
|
||||||
|
|
||||||
' End Property
|
|
||||||
|
|
||||||
' Public Property jpegQualityMin() As Long
|
|
||||||
' Get
|
|
||||||
' Return _jpegQualityMin
|
|
||||||
' End Get
|
|
||||||
' Set(ByVal value As Long)
|
|
||||||
' _jpegQualityMin = value
|
|
||||||
' End Set
|
|
||||||
|
|
||||||
' End Property
|
|
||||||
'End Module
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue