473,785 Members | 2,325 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Image.Save - Conversion from PNG to JPG

Hi all,

got a problem when converting a PNG to a JPG using the Image.Save(stre am,
format) method.

When I save the original PNG to a file and open it, it's fine. I then save
it to a database, retrieve it and Save it as a JPG format and most of the
image is fine except a large black band at the bottom of the image.

What can i do?

TIA

Sam Martin

ps. i've check to make sure it's not any problem due to the storage of the
data in the database. After it's retrieved, and saved as PNG, it's still
fine.
Nov 16 '05 #1
1 4495
actually, ignore that last bit. it is due to the conversion to and from the
database

has anyone got an example of how to store and retrieve an image from an
access database.

tia

sam

"Sam Martin" <sa*********@ya hoo.co.uk> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Hi all,

got a problem when converting a PNG to a JPG using the Image.Save(stre am,
format) method.

When I save the original PNG to a file and open it, it's fine. I then
save it to a database, retrieve it and Save it as a JPG format and most of
the image is fine except a large black band at the bottom of the image.

What can i do?

TIA

Sam Martin

ps. i've check to make sure it's not any problem due to the storage of the
data in the database. After it's retrieved, and saved as PNG, it's still
fine.

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2382
by: Paul Hamlington | last post by:
Hello, I've been programming in ASP for a little while now and quite an advanced user, but I have come across an unusual problem in which I need assistance. I have built my own image upload, I have two versions of the binary to string conversion one fast, one slow because some servers use chillisoft and therefore the append function in not accessible for a disconnected recordset.
1
1963
by: William Starr Moake | last post by:
This is for a browser-based WYSIWYG editor to convert image file paths from absolute to relative when the page under construction is saved. From inside the save function I get error message: "Cannot assign to function result." If I place just the HTML.replace part of the conversion script inside the save function and the rest outside, the error message is "imgSrcArray undefined." Can anyone figure out what is wrong with this path...
6
1444
by: Peder Y | last post by:
Surely, anyone can read it's attributes and methods... Now, how does Image store the image data? How does it discern between e.g. jpg, gif and bmp. Does it know it's own size, or does one need to save it to a stream to fetch the image size? I'm trying to save images of different formats to one single file. When I do someImage.FromStream(), will it know all the data as before, or will some be lost in some conversion process?
7
3400
by: Scott Schluer | last post by:
Is there a way to use the Image class to convert a color photo (GIF or JPEG) to a B&W photo? Thanks, Scott
2
2588
by: Jeronimo Bertran | last post by:
Hello, I am using a rendering aspx page to display a database image on an Image control. When the database record is retrieved, I am saving the bitmap to a session variable for the rendering aspx to load. Here is the code on the rendering page: CODE FOR ImageForm.aspx private void Page_Load(object sender, System.EventArgs e)
35
2676
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
5
7009
by: Dilmurat Sulayman | last post by:
Hi, I have a jpg image. Now, I'm going to put some text and merge it with other emf file. So, I converted it to emf file with Image.Save. but I couldn't load it. My code is: Image imgFile = Image.FromFile("test.jpg"); imgFile.Save("test.emf"), ImageFormat.Emf);
8
47949
by: platinumhimani | last post by:
-How to convert any image(8,16,24,32 or 64-bit) to 8-bit grayscale -i have tried to convert a 24-bit image to grayscale using setpixel and getpixel functions, in vb.net but i am unable to save that image in grayscale format.How do i do that.It still saves in true color format. -i used picturebox1.image.save() method -i tried to convert an 8-bit image into grayscale but was unable to do it.
1
2833
by: Smita Kashyap | last post by:
Hello to all, Which one is flexible/optimal solution to save uplaoded image. Frist save image at server or from where you're site pages are save in any image folder and save only image name or link to database. Secondly convert image to bite form then save whole bite form image to database. My friends feel that second one is right choice, but i felt that frist one is correct as conversion procedure and retrival from database is...
0
9645
marktang
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...
0
9481
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,...
0
10155
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10095
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,...
0
8979
agi2029
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...
0
6741
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();...
0
5513
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4054
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
3
2881
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.