473,385 Members | 1,782 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Image Storing Problem

Hi

I have problem with saving the Bitmap image. Here I given the my code,
Expand|Select|Wrap|Line Numbers
  1. void RotFlipImg::FlipImgData(char* mydata,prUInt32 imgsize)
  2. {
  3.   GdiplusStartupInput gdiplusStartupInput;
  4.   ULONG_PTR gdiplusToken;
  5.   GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
  6.  
  7.   FILE *fptr1;
  8.   fptr1=fopen("liveimage.bmp","wb");
  9.   fwrite(mydata,imgsize,1,fptr1);
  10.   fclose(fptr1);
  11.  
  12.  
  13.   Bitmap* bitmap = new Bitmap(mydata);
  14.   bitmap->RotateFlip(RotateNoneFlipX);
  15.   bitmap->Save(L"FlipImage.bmp",&guidBmp);
  16.  
  17.   delete bitmap;
  18.  
  19. }
  20.  
In above code the liveimage.bmp has only stored but FlipImage has not saved.

what is the problem in my code? Pl suggest me.
Dec 22 '07 #1
1 1196
weaknessforcats
9,208 Expert Mod 8TB
This code:
Bitmap* bitmap = new Bitmap(mydata);
doesn't appear to match any of the Bitmap constructors: http://msdn2.microsoft.com/en-us/lib...85(VS.85).aspx. That is, none of the constructors take a char* argument.

Are you using your own Bitmap class?
Dec 22 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a...
6
by: bissatch | last post by:
Hi, I am currently writing a news admin system. I would like to add the ability to add images to each article. What I have always done in the past is uploaded (using a form) the image to a...
8
by: iyuen | last post by:
I'm having problems with converting a byte array to an image object~ My byte array is an picture in VB6 StdPicture format. I've used propertybag to convert the picture into base64Array format in...
6
by: Rudy | last post by:
Hello all! I am amazed how many posts I have read to store an image in SQL, and just as many against it. So I learned how to store an image in a SQL db and retrieve the image. A little tricky,...
13
by: Neo Geshel | last post by:
I have examined about 80+ different upload scripts on the 'net, both in VB and C#, and none seem to do what I need them to do. Perhaps someone here can point me somewhere that Google hasn't...
35
by: Stan Sainte-Rose | last post by:
Hi, What is the better way to save image into a database ? Just save the path into a field or save the image itself ? I have 20 000 images (~ 10/12 Ko per image ) to save. Stan
3
by: den 2005 | last post by:
Hi everyone, Here is code working on..Trying to insert record with a column with Image or VarBinary datatype in sql database from a existing jpeg image file, then retrieve this image from...
0
by: ProgGuru | last post by:
Hi, I have a problem in the Image storing and retrieving at SQL Server 2005, my code is: ----------------------------------------------------------------------------- for storing: Image...
7
by: eholz1 | last post by:
Hello Group, Perhaps you can help me. I have a mysql db, that holds images. Images are encoded using base64_decode/encode, etc. Image data seems fine. I have a view.php page that is supposed...
4
by: Muddasir | last post by:
Hi.. i am having a strange problem.......the problem is i am trying to upload a file and to store it in db....when the file got stored in db...it got converted into black and white image and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
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,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.