import.css=/download/attachments/6062824/tecnologia.css

Retorna o tipo de imagem ( BMP ou JPG ) a partir de um path informado por parâmetro.

Sintaxe

RetImgType( < cPath > )

Parâmetros

Nome

Tipo

Descrição

Obrigatório

Referência

cPath

caractere

Indica o path completo da imagem.

X

 

Retorno

Nome

Tipo

Descrição

nRet

numérico

Tipo da imagem, onde: 1 = Bitmap e 2 = JPG

Observações

Exemplos

user function Exemplo ()
  Local cFile := "C:\totvs\bin\smartclient\totvs.jpg"
  Local nImgType := RetImgType( cFile )
  if nImgType == 1 // BMP
    conout("Arquivo BMP")
  elseif nImgType == 2 // JPG
    conout("Arquivo JPG")
  else
    conout("Arquivo nao encontrado ou nao identificado!")
  endif
Return

Abrangência

Microsiga Protheus 8.11 , Protheus 10 , TOTVS Application Server 10