The author or publisher shall not be liable if incidental or consequential damages occur in connection with, or arising from, the furnishings, performance, or use of the programs, associated instructions, and/or claims of productivity gains. Editor Gary Willoughby Print History July First Edition Disclaimer While every precaution has been taken in the preparation of this book and the programs contained within it, the author and publisher assumes no responsibility whatsoever for errors, omissions, or for damages resulting from the use of the information or programs contained herein. Fantaisie Software 10, rue de Lausanne Fegersheim France Published 2006, by Aardvark Global Publishing. PureBasic and all provided tools and components contained within the PureBasic package are Copyright 2006 Fantaisie Software. More details can be found here: PureBasic is a registered trademark of Fantaisie Software. If extension=".gif" Or extension=".jpe" Or extension=".jpg" Or extension=".bmp"įile = OpenFileRequester("Open image file","","Windows BMP Image (*.bmp)|*.bmp|GIF Image (*.gif)|*.gif|Jpeg Image (*.jpg)|*.jpe *.jpg", 0)įile = SaveFileRequester("Save image file","","Windows BMP Image (*.bmp)|*.1 Updated for Purebasic v4 Purebasic A Beginner s Guide To Computer Programming Gary Willoughbyģ Purebasic A Beginners Guide To Computer Programming Gary WilloughbyĤ PureBasic - A Beginner s Guide To Computer Programming by Gary Willoughby Copyright 2006 Gary Willoughby This book and all included source materials such as diagrams, photos and PureBasic source code is distributed under the Creative Commons Attribution Non-Commercial Share Alike License. ResizeWindow(ImgWidth*2, (ImgHeight*2)+MenuHeight) ResizeWindow(ImgWidth/2, (ImgHeight/2)+MenuHeight) SetWindowText_(ParentHandle, "Picture View - "+File+" 100%") ImageGadget = ImageGadget(0, 0, MenuHeight, WindowWidth(), WindowHeight()+MenuHeight, UseImage(0))ĪddKeyboardShortcut(0, #PB_Shortcut_O|#PB_Shortcut_Control, #Open)ĪddKeyboardShortcut(0, #PB_Shortcut_S|#PB_Shortcut_Control, #Save)ĪddKeyboardShortcut(0, #PB_Shortcut_Q|#PB_Shortcut_Control, #Quit)ĪddKeyboardShortcut(0, #PB_Shortcut_Pad0|#PB_Shortcut_Alt|#PB_Shortcut_Control, #Actual)ĪddKeyboardShortcut(0, #PB_Shortcut_Add, #Zoom_In)ĪddKeyboardShortcut(0, #PB_Shortcut_Subtract, #Zoom_Out)ĪddKeyboardShortcut(0, #PB_Shortcut_C|#PB_Shortcut_Control, #Copy)ĪddKeyboardShortcut(0, #PB_Shortcut_V|#PB_Shortcut_Control, #Paste)ĭragQueryFile_(hDrop, 0, MemoryID(), 256) SetClassLong_(ParentHandle, #GCL_HBRBACKGROUND, CreateBrushIndirect_(Brush))ĬreateImage(0, WindowWidth(), WindowHeight()) MenuHeight = GetSystemMetrics_(#SM_CYCAPTION)+GetSystemMetrics_(#SM_CYMENU)+8 If OpenWindow(0, 100, 100, 480, 320, #PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_SizeGadget, "Little Image Tool") SetWindowText_(ParentHandle, "Picture View - "+File+" "+StrF(((ImgWidth/IData\width)*100), 2)+"%") If WindowWidth=ptMinTrackSizex And ImgWidth> 16 Global nwidth, nheight, hmheight, hmwidth, rc.RECT Global IData.ImageData, BmpSize, BmpImage, FileSize, loaded.b, WindowWidth, WindowHeight, ImgWidth, ImgHeight, MenuHeight, xImg, yImg, ParentHandle, ptMinTrackSizex, aspect.f, hDC Thanks: Rings for helping me to deal with bitmaps in memory
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |