I try to use magnificpopup (via jquery not as an extension) in typo3 (8.7.16)(textmediaelement) - no Problem, but :)
If the original image is smaller than the normal popup, the size of the image increases...
I tried this in constant.ts
styles.content.textmedia.linkWrap.width = 1110m
styles.content.textmedia.linkWrap.height = 800m
and also
styles.content.textmedia.linkWrap.maxWidth = 1110
styles.content.textmedia.linkWrap.maxHeight = 800
with m behind or not.
Does anyone has an idea for this problem - how I can change this behavior?
Thanks
Volker
Try without linkWrap and set this in TypoScript SETUP:
styles.content.imgtext.maxW = 1140
styles.content.imgtext.maxWInText = 1140
the problem is not magnificPopUp, but fluidStyledContent.
in file
fluid_styled_content/Resources/Private/Partials/Media/Type/Image.html the ce:link.clickEnlarge hasn't got a parameter maxWidth. So I changed this link (in an own copy) to
<a href="{f:uri.image(src: 'fileadmin/{file.originalFile.identifier}', maxHeight: '{settings.media.popup.height}', maxWidth: '{settings.media.popup.width}')}"
rel="{settings.detail.media.image.lightbox.rel}" class="fluidbox">...</a>
For this solution is fully ok - Large images are becoming smaller and other are still as they are...
cu
Volker
Related
In pyBullet, I have struggled a bit with generating a dataset. What I want to achieve is to get pictures of what the camera is seeing: img = p.getCameraImage(224, 224, renderer=p.ER_BULLET_HARDWARE_OPENGL)
Basically: to get the images that are seen in Synthetic Camera RGB data and Synthetic Camera Depth Data (especially this one), which are the camera windows you can see in the following picture on the left.
p.resetDebugVisualizerCamera(cameraDistance=0.5, cameraYaw=yaw, cameraPitch=pitch, cameraTargetPosition=[center_x, center_y, 0.785])
img = p.getCameraImage(224, 224, renderer=p.ER_BULLET_HARDWARE_OPENGL)
rgbBuffer = img[2]
depthBuffer = img[3]
list_of_rgbs.append(rgbBuffer)
list_of_depths.append(depthBuffer)
rgbim = Image.fromarray(rgbBuffer)
depim = Image.fromarray(depthBuffer)
rgbim.save('test_img/rgbtest'+str(counter)+'.jpg')
depim.save('test_img/depth'+str(counter)+'.tiff')
counter += 1
I already run the following, so I don't know if it is related to the settings. p.configureDebugVisualizer(p.COV_ENABLE_DEPTH_BUFFER_PREVIEW, 1)
I have tried several methods because the depth part is complicated. I don't understand if it needs to be treated separately because of the pixel color information or if I need to work with the project matrixes and view matrixes.
I need to save it as a .tiff because I get some cannot save F to png errors. I tried playing a bit with the bit information but acomplished nothing. In case you asked,
# depthBuffer[depthBuffer > 65535] = 65535
# im_uint16 = np.round(depthBuffer).astype(np.uint16)
# depthBuffer = im_uint16
The following is an example of the the .tiff image
And to end, just to remark that these depth images keep changing (looking at all of them, then to the RGB and passing again to the depth images, shows different images regardless of being the same image. I have never ever seen something like this before.
I thought "I managed to fix this some time ago, might as well post the answer found".
The data structure of img has to be taken into account!
img = p.getCameraImage(224, 224, shadow = False, renderer=p.ER_BULLET_HARDWARE_OPENGL)
rgb_opengl = (np.reshape(img[2], (IMG_SIZE, IMG_SIZE, 4)))
depth_buffer_opengl = np.reshape(img[3], [IMG_SIZE, IMG_SIZE])
depth_opengl = far * near / (far - (far - near) * depth_buffer_opengl)
seg_opengl = np.reshape(img[4], [IMG_SIZE, IMG_SIZE]) * 1. / 255.
rgbim = Image.fromarray(rgb_opengl)
rgbim_no_alpha = rgbim.convert('RGB')
rgbim_no_alpha.save('dataset/'+obj_name+'/'+ obj_name +'_rgb_'+str(counter)+'.jpg')
# plt.imshow(depth_buffer_opengl)
plt.imsave('dataset/'+obj_name+'/'+ obj_name+'_depth_'+str(counter)+'.jpg', depth_buffer_opengl)
# plt.show()
Final Images:
Im trying to make a script that takes and input image and fades it out. So far this is my script
imgObject = im.open(imageName)
toAppend = []
for i in range(int(256)):
imgObject.putalpha(i)
toAppend.append(imgObject)
#imgObject.save('images/'+str(i)+'.png', 'PNG')
imgObject.save('finished.gif', save_all=True, append_images=toAppend)
When this is run, the output gif is just a still of the input with no changes. But if i save each image as a png, then the transparency works! It saves 255 different images where you can see it fade out. I've also tried stitching these photos together after the fact, but the same or similar problems occurred.
I've also tried this, this, this, and this. All producing the same effect.
Read more into the docs and found this
imgObject = im.open(imageName)
bpiObject = im.open(backroundName)
toAppend = []
for i in range(100):
imgObject = im.blend(imgObject, bpiObject, i/100)
toAppend.append(imgObject)
imgObject.save('finished.gif', save_all=True, append_images=toAppend, loop = 0)
This worked for me, they do have to have the same dimensions though
I think I am experiencing this ages-old behaviour in a TYPO3 6.1 site
http://forge.typo3.org/issues/15522
As soon as there is more than one image in a textpic field, this TypoScript
tt_content.image.20.maxWInText = 300
will produce very small images - their size is the given rendering size divided by number of images.
So with three images in a textpic element, this will give me three 100px wide images.
How can this be set to work normally (value 300 applied to each image?)
EDIT: I'm posting the full config I've been using:
imgWidth=CASE
imgWidth{
key.field = header_layout
default=TEXT
default.value=1000
1=TEXT
1.value=1000
2=TEXT
2.value=500
3=TEXT
3.value=300
4=TEXT
4.value=500
5=TEXT
5.value=300
6=TEXT
6.value=500
7=TEXT
7.value=300
8=TEXT
8.value=0
9=TEXT
9.value=0
10=TEXT
10.value=150
10=TEXT
10.value=1000
}
tt_content.image.20.maxWInText.cObject < imgWidth
tt_content.image.20.maxW.cObject < imgWidth
This setting is supposed to affect the width occupied by all images in a column. Therefore it must effect all images.
You should take a look at
tt_content.image.20.maxW
I have the following Circos diagram, which I rendered as an SVG file and then converted to PNG, for the purposes of illustration:
The text labels that circle the outer rim are oriented correctly from 12 o'clock to 9 o'clock, oriented outwards, away from the grey arcs.
Between 9 and 12, the text labels are oriented inwards, overlapping the grey arc. This is not expected.
Here's a close-up, to clarify the issue:
If I output a PNG from Circos, instead of SVG, the labels are drawn correctly, but then I lose the ability to mark up the vector-formatted SVG figure in Adobe Illustrator or Inkscape. So I need the SVG output.
Here's a snippet of the circos.conf file relevant to the addition of the labels:
<image>
dir = /tmp
file = circos.png
png = yes
radius = 3000p
background = white
angle_offset = -176
</image>
...
<plots>
<plot>
type = text
color = black
file = factorList.txt
r0 = 1r
r1 = 1r+200p
label_size = 12p
label_font = condensedbold
padding = 0p
rpadding = 0p
label_snuggle = yes
max_snuggle_distance = 1r
snuggle_sampling = 2
snuggle_tolerance = 0.25r
snuggle_link_overlap_test = yes
snuggle_link_overlap_tolerance = 2p
snuggle_refine = yes
</plot>
</plots>
I'm not sure what other options I can apply to try to resolve this. My question is: What should I try in this or another configuration file, which fixes the SVG output? Thanks for your advice.
Maybe you can try this option:
label_rotate = no
And I think the layout above caused by the snuggle option ,and also check your conf file and be sure all the "r0" and "r1" of plot(type=text) are bigger than 1r .
Here is the circos lessonss example
- (double) tableSize
{
double tableSize1=[self tableView:tableViewA numberOfRowsInSection:0]*tableViewA.rowHeight;
return tableSize1;
}
I use that code to know tablesize, but I want to know easier way to know it.. like tableviewA.size or something like that..
example : tableviewA have 20 tableviewcell, I want to know the tableviewA size.. how to know it?
If I do tableViewA.frame.size.height it'll always show 400, which is the height of the table frame, because that's the size of the table view. I want the size of the whole table including those I need to scroll. –
For example, if the tableviewA has lots of rows then I want to see a high number
You can use this - tableView.contentSize.height
this help?
tableView.frame.size.height
or
tableView.frame.size.width
then may be you can use
CGSize tableViewContentSize = tableView.contentSize;
to get the content size.
then to get the height and width just
tableViewContentSize.height
tableViewContentSize.width