Hello All,
I would like to be able to edit a .BMP-file, while retaining it's
color-depth & colors.
Actually, I want to cut small pieces outof one .BMP, and store it into
another one. Jup, sort of a tile-editor :-)
Does anyone have a small sample (or pointer to one) of howto :
1) Load & save a device-independant bitmap (DIB).
2) Create a Device-independant bitmap that has the color-depth/colors of
another DIB
3) BitBlit from one to the other (although I think I allready have an idea
how to do this :-)
I've allready looked in my snippets-bag & used google, but I can't say I
grasp what has to be done ... :-\
Regards,
Rudy Wieser 0 1629 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Stimp |
last post by:
Hi,
I output a GIF file, loaded into a Bitmap, as follows:
Dim imgMap As New
Bitmap(System.Drawing.Image.FromFile(Server.MapPath("original.gif")))
Response.ContentType = "image/gif"
imgMap.Save(Response.OutputStream,
System.Drawing.Imaging.ImageFormat.Gif)
|
by: Steve |
last post by:
I haven't used authentication/authorization in awhile. I'm having a hard
time deciding how to display the edit column in a datagrid ONLY if a user
with proper credentials is logged in. In other words, if 'joe public' goes
to the site, I don't want him to see the edit options, however if an admin
is logged in, I want them to see the edit icon.
How do you do this?
Thanks for any help, I'm sure I just need my memory jarred...
|
by: Crirus |
last post by:
Strange behaviour: I havea bitmap that I draw and add to an array of
bitmaps...
Do I have to create a bitmap using New every time?
I tried to draw the bitmap in a for loop alike this:
Dim mask As Image = getPicture("mask")
Dim tempMask As Bitmap=New Bitmap(tile.Width, tile.Height)
Dim grMask As Graphics= Graphics.FromImage(tempMask)
Dim x As Integer
|
by: Lance |
last post by:
I need to create a Drawing.Bitmap from an array of integer
values. My current technique creates a bitmap that
eventually becomes corrupt (i.e., the bitmap's pixels
change to a different color after a while). Can somebody
please tell me what I'm doing wrong? Here is a sample:
Public Shared Function CreateBitmapFromArray( _
ByVal width As Integer, _
ByVal height As Integer, _
ByVal pixelFormat As Drawing.Imaging.PixelFormat, _
|
by: Dennis |
last post by:
I am trying to implement drawing on a bitmap and using bitblt to transfer
it to the control graphics object in the paint event. It seems to draw on
the bitmap ok but doesn't get transferred to the control graphics object in
the paint event. Any help would be appreciated. Here is my code:
public class as mycontrol
Private Declare Auto Function BitBlt Lib "GDI32.DLL" (ByVal hdcDest As
IntPtr, ByVal nxDest As Integer, ByVal nyDest As...
| |
by: Sebastor |
last post by:
Hi
I create bitmap array :
Graphics::TBitmap ***bitmap;
bitmap = new Graphics::TBitmap**;
for (int s=0;s<x;s++)
{
bitmap = new Graphics::TBitmap*;
|
by: Yoavo |
last post by:
Hi,
I am writing a COM class in c# which needs to implement an interface which
one of its methods declared in the following way:
public stdole.IPicture GetBitmap()
{
}
I have a bitmap (MyBitmap.bmp) in my c# application and I want to load it,
and return it as a return value of the method GetBitmap.
I created a System.Drawing.Bitmap object and load it with MyBitmap.bmp file.
|
by: benfly08 |
last post by:
Hi, guys.
I have a program to draw bar/pie chart based on the data i hard coded in it. However, my image comes with "BLACK" background color. I don't know how to fix this. The code snippet is below:
chartGenerator.vb class:
Imports System.Drawing.Imaging
Public Class chartGenerator
Private myImage As Bitmap
|
by: dino d. |
last post by:
hi everyone- my subject pretty much says it all- is there a secure way
to do this? the non-secure ways are, as i understand it, to populate
a listbox with indices as names, or maybe use a hidden control. is the
only secure way with sessions? i was also thinking about perhaps
creating a meta table that says who is editing which record right
now. any advice?
thanks,
dino
|
by: Nathan Sokalski |
last post by:
I have created declared a Bitmap using the following statement:
Dim bmp As New Bitmap(100, 100, PixelFormat.Format8bppIndexed)
Because the SetPixel() method is disabled and a Graphics object cannot be
created for indexed PixelFormats, I am not sure how to edit the Bitmap. I am
assuming that there is some class or technique other than the following:
Dim bmpdata As BitmapData = bmp.LockBits(New Rectangle(0, 0, bmp.Width,
bmp.Height),...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
| |
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| | |