Page loading

Share your opinion
What do you think about gambaslinux.fr?
 
Interesting
It miss some informations
Excellent website
Results
WIDGETS GAMBAS
GAMBAS 3 SOFTWARES
TUTORIALS
Library
Use picture - PNG to ICON files
sorry, french only...
CREATE ICON FILES FROM PICTURE FILES(PNG,JPG,GIF,etc...)


icone.png
Voici une petite application tutoriel pour apprendre à créer des icônes à partir de fichiers images.

Le code de l'application est le suivant :

' Gambas class file
'-----------------------------------
 ' Projet    : Création d'icones
 ' Date      : 10/09
 ' Auteur    : taoteblues (Dr Henri LOQUET)
 ' Détails   : Création d'icones en 16x16 à 48x48
'-----------------------------------


PUBLIC taille AS Integer = 1

PUBLIC tempFile AS String
PUBLIC mode AS String

PUBLIC SUB Form_Open()
mode = "16"
ME.Center
END

PUBLIC SUB Button1_Click()

DIM img AS Image
Ouvrir.ShowModal
IF Module1.monimage <> "" THEN
img = Image.Load(Module1.monimage)
IF Exist(Module1.monimage) THEN
    IF Lower(File.Ext(Module1.monimage)) = "png" OR Lower(File.Ext(Module1.monimage)) = "jpg" OR Lower(File.Ext(Module1.monimage)) = "gif" THEN
   tempFile = Mid$­(Module1.monimage, 1, Len(Module1.monimage) - 4)

    img = img.Stretch(Val(mode), Val(mode), TRUE)
    img.Save(tempFile & mode & "x" & mode & ".png")

 PictureBox1.Picture = ""
 PictureBox1.Refresh
 PictureBox1.Picture = Picture.Load(tempFile & mode & "x" & mode & ".png")
 Label1.Text = tempFile & mode & "x" & mode & ".png"


 ELSE
 Message.Info("Le fichier n'est pas dans le bon format: png, jpg ou gif!", "Ok")
 ENDIF
 ELSE
  Message.Info("Le fichier n'existe pas!", "Ok")
 ENDIF
 ENDIF
CATCH
  Message.Warning(ERROR.Text)


END


PUBLIC SUB RadioButton2_Click()

  mode = "24"

END

PUBLIC SUB RadioButton3_Click()

   mode = "32"

END

PUBLIC SUB RadioButton4_Click()

   mode = "48"

END

PUBLIC SUB RadioButton1_Click()

   mode = "16"

END

PUBLIC SUB ToolButton1_Click()

  Aide.ShowModal

END




Creation date : 11/10/2009 @ 14:58
Last update : 11/10/2009 @ 14:58
Category : Use picture
Page read 5601 times


Print the article Print the article


react.gifReactions to this article


Reaction #1 

by pinky 16/10/2009 @ 19:32

Salut spheris

Sympa ce petit dimensionneur d'images. tongue

QUICK MENU
SEARCH




LANGUAGE
COMPONENTS
Other
LANGUAGE
Where, who?
VISITS

   visitors

   visitors online

ARCHIVES GAMBAS 1/2
^ Top ^