Environmental statement: In the ARM Linux environment of the IMX6ULL development board, combined with the latest version of the factory system of Zhengdian Atom, the FTP server on the development board can be connected to the FTP server on the Windows filezilla software to transfer files to each other 1. vi /etc/vsftpd.conf //Modify the configuration […]
Tag: gdi
Use sgdisk, e2fsck and resize2fs to expand partitions
Email: [email protected] refer to: man sgdisk Use sgdisk to manage partitions Basic usage of sgdisk Consider the following scenario: When compiling the flash package, an image in the gpt partition format is made according to 2GB eMMC, but the size of the eMMC used in the end is 4GB. How to make the last partition […]
Load bitmaps in combination with GDI in D2D environment
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <Windows.h> #include <d2d1.h> #include <wincodec.h> #pragma comment(lib, “d2d1.lib”) #pragma comment(lib, “Windowscodecs.lib”) #define SAFE_RELEASE(P) if(P){P->Release() ; P = NULL ;} extern “C” ID2D1Bitmap* mybitmapcreate(ID2D1DCRenderTarget*); float left = 5; float top = 10; float Bottom = 10; float Right = 30; ID2D1Bitmap *pBitmap = NULL; IWICImagingFactory *pIWICFactory = NULL; void […]
win32 – use GDI+ to play gif pictures
I encountered such a problem when I was doing a case today, so I recorded it. Codeproject has a similar case, but it is compiled using the MFC template. Because we only need win32 programs, so…. the code is as follows: CodeProject: Play GIF using GDI+ The other is implemented using double buffering, I have […]
Use GDI+ (WIC) to load 32-bit bitmap or PNG image (with transparency channel)
#include <windows.h> #include <gdiplus.h> HBITMAP LoadBitmapFromResource(DWORD ResourceID, bool transparent = true) { HANDLE hGlobal = NULL; ULONG_PTR GDIToken = 0; Gdiplus::Image* Img = NULL; Gdiplus::GdiplusStartupInput GDIStartInput = NULL; Gdiplus::GdiplusStartup( &GDIToken, &GDIStartInput, NULL); HRSRC hResource = FindResource(NULL, MAKEINTRESOURCE(ResourceID), “BINARY”); if (!hResource) {<!– –>return NULL;} HGLOBAL hFileResource = LoadResource(NULL, hResource); if (!hFileResource) {<!– –>return NULL;} LPVOID lpFile […]
Win32 – Use of GDI+ Gaussian Blur
Although GDI+ is marked in the title, it is not actually used in the actual implementation. However, the relevant documentation of GDI+ has some API instructions about Gaussian blur, see the link below: Blur class (gdipluseffects.h) Using the Blur class, you can apply a Gaussian blur effect to a bitmap and specify the nature of […]
[2023 Hangdian Multi-school 5 1005] Snake (generating function)
Title have no no n labels are 1 , 2 , ? ? , no 1,2,\cdots,n 1,2,?,n balls, placed on m m m unlabeled boxes (the order in the box is labeled), and the number of balls in each box does not exceed k k k, find the number of solutions 998 ? 244 ? […]
[2023 Hangdian Multi-School 5 1002] GCD Magic (Push formula, Mobius inversion, Dujiao sieve)
Title beg ∑ i = 1 no ∑ j = 1 no [ gcd ? ( 2 i ? 1 , 2 j ? 1 ) ] k \sum_{i = 1} ^ {n} \sum_{j = 1} ^ {n}[\gcd(2 ^ i – 1, 2 ^ j – 1)] ^ k i=1∑n?j=1∑n?[gcd(2i?1,2j?1)]k right 998 ? 244 ? […]
HDU-7314 2023 “Rake Programming” Hangdian Multi-School Competition (4) Simple Set Problem
HDU-7314 2023 “Rake Programming” Hangdian Multi-School Competition (4) Simple Set Problem The main idea of the topic have k k k non-empty multisets, the th i i The size of the i sets is c i c_i ci?, you need to choose a number in each multiset, the composition length is k k array of […]
HDU-7308 2023 “Rake Programming” Hangdian Multi-School Competition (3) Operation Hope
HDU-7308 2023 “Rake Programming” Hangdian Multi-School Competition (3) Operation Hope The main idea of the topic In a game, there are no no n roles, each role has three attributes a i , b i , c i a_i, b_i, c_i ai?, bi?, ci?. for each character i i i, you can set the a […]