I am working a an Image processing program, and I want to save my jpegs as being progressive (blurry to sharp instead of line by line while it loads). this does not work howerver: - ImageCodecInfo iciJpegCodec = null;
-
EncoderParameter epQuality = new EncoderParameter(System.Drawing.Imaging.Encoder.Quality, 98L);
-
ImageCodecInfo[] iciCodecs = ImageCodecInfo.GetImageEncoders();
-
EncoderParameters epParameters = new EncoderParameters(2);
-
epParameters.Param[0] = epQuality;
-
epParameters.Param[1] = new EncoderParameter(System.Drawing.Imaging.Encoder.RenderMethod, EncoderValue.RenderProgressive);//does not work
-
for (int i = 0; i < iciCodecs.Length; i++)
-
{
-
if (iciCodecs[i].MimeType == "image/jpeg")
-
{
-
iciJpegCodec = iciCodecs[i];
-
break;
-
}
-
}
-
-
btmp.Save(toplace, iciJpegCodec, epParameters);
5 6008 tlhintoq 3,525
Recognized Expert Specialist
"Does not a work" is more than just a little vague. Do you get an error message? Does the code break on a given line? Do you get no errors but it doesn't save?
@tlhintoq
It saves with no errors, but it is not progressive. (when I use Firefox throttle, it comes in line by line)
Plater 7,872
Recognized Expert Expert
Progressive IS line by line.
Interlaced is every other line
No idea how the blurry->sharp comes about
Plater 7,872
Recognized Expert Expert
Ah, I was thinking of the old GIF style of terminology:
"Interlacin g is also known as "progressiv e" encoding, because the image becomes progressively clearer as it is received. This terminology is different than the interlaced and progressive scan terminology of video encoding."
According to what I read in the wiki, you would want the interlace.
Interlacing is a method of encoding a bitmap image such that a person who has partially received it sees a degraded copy of the entire image. When communicating over a slow communications link, this is often preferable to seeing a perfectly clear copy of one part of the image, as it helps the viewer decide more quickly whether to abort or continue the transmission.
Or
There is also an interlaced "Progressiv e JPEG" format, in which data is compressed in multiple passes of progressively higher detail. This is ideal for large images that will be displayed while downloading over a slow connection, allowing a reasonable preview after receiving only a portion of the data. However, progressive JPEGs are not as widely supported, and even some software which does support them (such as some versions of Internet Explorer) only displays the image once it has been completely downloaded.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Carlo |
last post by:
I have a table with a lot of fields. One is a numeric field.
How can I introduce in these field a progressive number.
I have to change at times the start number.
example:
55,56,57,58,59,60,134,135,136,137
|
by: Mark Johnson |
last post by:
How can you save all or a portion of the Grafics object to a Image/Bitmap ?
I am try to save the Images from Cards.dll to a BitMap file.
I can read in the Images to the Grafics, but when I try this with a Bitmap
the results are Black.
Can you somehow Clip the Grafic and Paste it into the Bitmap ?
Mark Johnson, Berlin Germany
mj10777@mj10777.de
|
by: Pat Richey |
last post by:
i'm trying to make an open and a save file dialog that allows you to open/save
various formats, but when you change the extension you want to filter the file
list disappears until you leave the current directory. here's the code
for the save box:
SaveFileDialog sfd = new SaveFileDialog();
sfd.Filter = "Portable Document Format (*.pdf)|*.pdf"
+ "|Encapsulated Postscript (*.eps)|*.eps"
+ "|Bitmap (*.bmp)|*.bmp"
+ "|JPEG...
|
by: yaya via DotNetMonster.com |
last post by:
Hi, I have a picture box with circles and rectangles, and I wana save all
the images into a jpg file, i tried
pictureBox1.Image.Save(@"c:\1.jpg");
but I got and error
"System.NullReferenceException: Object reference not set to an instance of
an object."
Can anyone help? Thanks...
--
|
by: Barry |
last post by:
Hi
Does anyone know why i am getting the following error message (line 64)
, if i change to objBitmap.Save(Response.OutputStream, ImageFormat.Jpeg) i
do not get this error
Exception Details: System.Runtime.InteropServices.ExternalException: A
generic error occurred in GDI+.
| |
by: Olaf Baeyens |
last post by:
I want to convert one bitmap file to another one.
For example load as bmp and save as jpg.
The loading part is simple I do this:
Stream BitmapStream =
File.Open(sSrcFile,FileMode.Open,FileAccess.Read,FileShare.None);
Bitmap imgPhoto=new Bitmap(BitmapStream);
iPixelsX=imgPhoto.Width;
iPixelsY=imgPhoto.Height;
BitmapStream.Close();
|
by: nhacnhac |
last post by:
Hi Guys
does anyone knows if the a JPEG file saved as JFIF version 1.02 is always considered progressive?
I need to create a program in C# to open JPEG files and upload just the non-progressive JPEG files.
I'm trying to find information about how to identify a progressive and non-progressive JPGE image, but I'm stuck.
Does anyone knows if I can find the progressive information just analysing the JPEG header or that is part of the...
|
by: keyesarone |
last post by:
Hi,
I am using VC++ 6.0 with directshow 9.0 to capture video from the
camera. Using GDI+ Bitmap class and i am saving the buffer image into
JPEG format file. When i use GDI+, i can save the buffer easily into
JPEG file. But now i need to save the buffer into JPEG 2000(jp2)
format file.
And also if anyone know how to use CXImage free Library or Jasper
Library
|
by: phanibiddu |
last post by:
How to draw on windows form and save it as Jpeg file
I am trying with this code but not comming
public Form3()
{
InitializeComponent();
//rnd = new Random((int)DateTime.Now.Ticks); // seeded with ticks
myPen = new Pen(Color.Red);
|
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: 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: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |