Reporting Services HTML export - image resizing issue - reporting

Hello.
In order to execute reports’ rendering into the HTML 4.0 format I use the ReportExecutionService class
In order to get exported report as a stream I use the following code:
var ms = new MemoryStream(connection.Render(format, dev_info, out ext, out mime_type, out encoding, out warnings, out streamIds));
The issue is: when I display the received stream in a browser, the images with the “Fit proportional” property display incorrectly.
The original SSRS reportViewer and my project the images display as in the picture below:
image 1
Image properties in the Designer:
image 2
What configuration settings should I set so that I am able to display exported report with images from my application as in the original SSRS reportViewer?

In my experience the best way to include images in reports is to pre-size the images to the actual size you want them displayed in the report and then set to use "Original Size".
Using "Fit Proportional" often seems to result in poor image quality when the image is resized, it could also be causing the issue you are seeing as well.

Related

Adding a background image to an SSRS 2012 report

I am trying to add an image so that it will work as a background for my ssrs report. I would also like it so that it doesn't cover up anything on the report, like in Word when you wrap an image to go behind the text. And is there a setting that would have the image fit to the entire page? Thanks!
In report design view, select the report item to which you want to add a background image.
If the Properties pane is not visible, on the View tab, select Properties.
In the Properties pane, expand BackgroundImage, and then do the following:
For an embedded image:
Set Source to Embedded.
Set Value to the name of an image that is embedded in the report.
For an external image:
Set Source to External.
Set Value to a valid path to an image. This can be on a report server in native mode or SharePoint integrated mode, or it can be on any other Web site
For an image is that is contained in a field in the database to which the report item is connected:
Set Source to Database.
Set Value to the name of a field in the report dataset
For MIMEType, or file format, select the appropriate MIME type for the image-for example, .bmp.
For BackgroundRepeat, select an expression, Default, Repeat, RepeatX, or RepeatY, or Clip.
For background images in a chart, BackgroundRepeat can be set to Default, Repeat, Fit, and Clip, but not RepeatX or RepeatY.
Thanks.

Drupal resize image on the fly

Is it possible to resize images on the fly and cache the result with Drupal?
I have some big images (e.g. 2000x2000px) and I want to display a preview of the e.g. 100x100px.
I know there is a theme_image_style function. But it seams to only create the <img> with the right size and not effectively resize the image.
I look at modules/images/image.admin.inc and they used the function [image_style_create_derivative][2].
Yes, you should use Drupal's Image styles (Configuration -> Media -> Image styles). There you should create your style.
Then, on front-end, when ever you want to display image with that style (in that resolution) you can use image_style_url() function:
https://api.drupal.org/api/drupal/modules!image!image.module/function/image_style_url/7
It accepts 2 parameters - one is image style machine name and other is image URI, which you can get if you print out all image field properties.
You can also select image styles from back-end interface...i.e. when creating a view for some image you can select to be displayed in specific image style.
In both cases those image styles are generated the first time image is used.
In response to your comment on MilanG's answer, using image_style_url() is the best option on the backend. There is also
https://www.drupal.org/project/resp_img
which may be something worth looking into. From a UX perspective, you don't want to force the user to load a 2000x2000 px image every time they load the page. Regardless of the outputted size, the image is still going to render as a 2000x2000 px image with a large size. image_style_url() or using image styles in the GUI create a new file that will load much quicker and is the preferred method.

Images Fail to Display When Exported to WORD from SSRS

When I set the database image Sizing property to 'Fit Proportional' and export the document to WORD some of the database images fail to render. If on the other hand the image sizing property is 'Fit to Size' then all the images always render when exported to WORD. I eliminated all report elements except the image in the body but the results are the same.
Additional Info: The image is not nested in a rectangle or table. The DB images originated as jpegs and are stored as VARCHAR(max).
I think the issue is more of a Word problem than SSRS. When you say "some" images fail to render when set to "Fit Proportional" that makes me think that the image is too large to fit on the page therefore not displaying.
I would guess the images that don't go beyond the margins of the page are the ones that display properly.
HTH
I also had this problem. I was trying to export to Word and some images were not showing while others were. I found this thread:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/211c2ee1-30a7-4c42-88bd-88333a6fe988/missing-images-in-headerfooter-when-exporting-to-word-in-ssrs-2008-r2?forum=sqlreportingservices
Someone suggesting reducing the image size before importing it into SSRS. That worked for me, so it might help you.

Is it possible set the JPEG quality using the get_serving_url() in Google App Engine?

When using get_serving_url(user.photoBlobKey) to return an image URL from the GAE Blobstore, the Google Images API returns a JPEG image with quality = 70 and size = 512px as default.
Is there any way to increase the default JPEG quality returned by get_serving_url()?
There's an undocumented URL parameter l, you can add it to the end of the image URL like so: =l100 (or =s640-l70 if you have another param before it) that should modify the output quality of the JPEG. Seems to be =l1 to =l100.
See also: List of all the App Engine images service get_serving_url() URI options
No there is not.
If you think it's a useful feature you can add an item to the issue tracker, from there the team will assess the demand for implementing it.
you can't control the output quality but by requesting
get_serving_url(user.photoBlobKey, size=0)
you will get the original size of the image up to 1600px height and width.
the returned url will be automatically postfixed with =s0 which you could add also before rendering the image in the template for example.

How to display pictures in the project resource?

I have a set of small icons and hope to display them in my application when certain condition occurs, for example on sunny day, I display the sunny icon.
I can add the jpg files in the picture, and they seem to be uploaded to phone when I deploy the app. However, I don't know how to access these jpgs in my program.
Could someone help? Thanks a lot!
Check this post about content and resources: http://www.windowsphonegeek.com/tips/wp7-working-with-images-content-vs-resource-build-action
To summarize: You should mark your images with a Build Action of Content or Resource, preferably Content. Now you can reference the Content from your Xaml or in code.
If the Build Action for your image resources is set to Content, then you just specify the Source property for the Image control to the relative path to your images:
this._image.Source = new BitmapImage(
new Uri("/Images/myImage.jpg", UriKind.Relative"));
You can display pictures using the Image element:
<Image Source="/MyImage.png" Visibility="Visible"/>
If you want to switch images according to conditions then you can create multiple images and change each of their Visibility states - or (more preferable) you can create a single image element and change its Source.
Quite how you do this depends on whether you are using databinding or working directly with the UIElements in code behind.

Resources